25๋ ๋ Cilium Study 1๊ธฐ ์ ๋ฆฌ ๊ธ์ ๋๋ค.
Geneve + DSR
(โ|HomeLab:N/A) root@k8s-ctr:~# helm upgrade cilium cilium/cilium --version 1.18.0 --namespace kube-system --reuse-values \
--set tunnelProtocol=geneve --set loadBalancer.mode=dsr --set loadBalancer.dsrDispatch=geneve \
--set loadBalancer.algorithm=maglev
Release "cilium" has been upgraded. Happy Helming!
NAME: cilium
LAST DEPLOYED: Sat Aug 16 20:03:24 2025
NAMESPACE: kube-system
STATUS: deployed
REVISION: 3
TEST SUITE: None
NOTES:
You have successfully installed Cilium with Hubble Relay and Hubble UI.
Your release version is 1.18.0.
For any further help, visit https://docs.cilium.io/en/v1.18/gettinghelp
(โ|HomeLab:N/A) root@k8s-ctr:~# kubectl -n kube-system rollout restart ds/cilium
daemonset.apps/cilium restarted
(โ|HomeLab:N/A) root@k8s-ctr:~# kubectl exec -it -n kube-system ds/cilium -- cilium status --verbose
...
Mode: DSR
DSR Dispatch Mode: Geneve
Backend Selection: Maglev (Table Size: 16381)
Session Affinity: Enabled
์ค์ ์ ์๋ ์๋น์ค IP๊ฐ ๋ชจ๋ ๋ ธ๋์ ๊ท ๋ฑํ๊ฒ ๊ด๊ณ ๋์ด์ ํ๋๊ฐ ์๋ ๋ ธ๋๋ก๋ ํธ๋ํฝ์ด ํ๋ฌ๋ค์ด๊ฐ๋ ๋ฌธ์ ๊ฐ ์์๋ค.
ํ์ง๋ง externalTrafficPolicy=Local๊ณผ ํจ๊ป ์ ์ค์ ์ ์ ์ฉํ์ฌ BGP ๋ผ์ฐํ ํ ์ด๋ธ์๋ ์ค์ ๋ก Pod๊ฐ ์กด์ฌํ๋ ๋ ธ๋๋ง nexthop์ผ๋ก ์กํ๋ค.
์ธ๋ถ์์ ๋ค์ด์จ ์์ฒญ์ Geneve ์บก์๋ง์ ํตํด ์ ์ ํ ํ๋๋ก ๋๋ฌํ์ฌ ์๋ต์ Pod → ํด๋ผ์ด์ธํธ๋ก ์ง์ ๋๊ฐ๋ฏ๋ก ๋ถํ์ํ ํ์ด ์ฌ๋ผ์ง๊ฒ ๋๋ค.
์ปจํธ๋กค ํ๋ ์ธ, ์์ปค๋ ธ๋0,1์์ curl ํ ์คํธ
tcpdump -i eth1 -w /tmp/dsr.pcap
root@router:~# curl -s $LBIP
Hostname: webpod-697b545f57-fnz6w
IP: 127.0.0.1
IP: ::1
IP: 172.20.0.205
IP: fe80::c8f4:b0ff:fe01:9d74
RemoteAddr: 192.168.10.200:43122
GET / HTTP/1.1
Host: 172.16.1.1
User-Agent: curl/8.5.0
Accept: */*

loopy ๎ฐ ~/cilium-lab๎ฐ
๎ฐ vagrant plugin install vagrant-scp
Installing the 'vagrant-scp' plugin. This can take a few minutes...
Fetching hashdiff-1.2.0.gem
Fetching crack-1.0.0.gem
Fetching public_suffix-6.0.2.gem
Fetching addressable-2.8.7.gem
Fetching webmock-3.25.1.gem
Fetching rspec-support-3.13.4.gem
Fetching diff-lcs-1.6.2.gem
Fetching rspec-expectations-3.13.5.gem
Fetching rspec-core-3.13.5.gem
Fetching rspec-its-2.0.0.gem
Fetching rspec-mocks-3.13.5.gem
Fetching rspec-3.13.1.gem
Fetching rake-13.3.0.gem
Thank you for installing the Vagrant VMware Desktop
plugin. This plugin requires the Vagrant VMware
Utility to be installed. To learn more about the
Vagrant VMware Utility, please visit:
https://www.vagrantup.com/docs/providers/vmware/vagrant-vmware-utility
To install the Vagrant VMware Utility, please
download the appropriate installer for your
system from:
https://www.vagrantup.com/downloads/vmware
Fetching vagrant-scp-0.5.9.gem
Successfully uninstalled addressable-2.8.7
Successfully uninstalled crack-1.0.0
Removing htmldiff
Removing ldiff
Successfully uninstalled diff-lcs-1.6.2
Successfully uninstalled hashdiff-1.2.0
Successfully uninstalled public_suffix-6.0.2
Removing rake
Successfully uninstalled rake-13.3.0
Successfully uninstalled rspec-3.13.1
Removing rspec
Successfully uninstalled rspec-core-3.13.5
Successfully uninstalled rspec-expectations-3.13.5
Successfully uninstalled rspec-its-2.0.0
Successfully uninstalled rspec-mocks-3.13.5
Successfully uninstalled rspec-support-3.13.4
Successfully uninstalled webmock-3.25.1
Installed the plugin 'vagrant-scp (0.5.9)'!
loopy ๎ฐ ~/cilium-lab๎ฐ
๎ฐ vagrant scp k8s-ctr:/tmp/dsr.pcap .
Warning: Permanently added '[127.0.0.1]:60000' (ED25519) to the list of known hosts.
dsr.pcap 100% 48KB 44.0MB/s 00:00

- Outer ํค๋ (Geneve Encapsulation)
- Src: 192.168.10.100 (์ปจํธ๋กค ํ๋ ์ธ)
- Dst: 192.168.10.101 (์์ปค1)
- Protocol: UDP/6081 (์ ๋ค๋ธ)
- Inner ํค๋ (์๋ ์์ฒญ ํจํท)
- Src: 192.168.10.200 (๋ผ์ฐํฐ)
- Dst: 172.20.1.135 (Pod IP)
- Protocol: TCP 43124 → 80, HTTP GET
ํ๋(172.20.1.135)๋ Geneve ํฐ๋์ ๊ฑฐ์น์ง ์๊ณ ์ง์ ๋ผ์ฐํฐ(192.168.10.200)๋ก ์๋ต์ ๋ฐํํ๋๋ฐ,
์ด๋ Cilium DSR(Direct Server Return) ๋ชจ๋์ ํน์ง์ผ๋ก ์๋ต ํธ๋ํฝ์ ์๋น์ค ๋ ธ๋๋ฅผ ๊ฑฐ์น์ง ์๊ณ ๋ฐ๋ก ํด๋ผ์ด์ธํธ๋ก ํฅํ๋ ๊ฒ์ ๋ณด์ฌ์ฃผ๋ ๊ฒ์ด๋ค.
'Infra > ์ฟ ๋ฒ๋คํฐ์ค' ์นดํ ๊ณ ๋ฆฌ์ ๋ค๋ฅธ ๊ธ
| [Cilium] #6์ฃผ์ฐจ (1) cilium + ingress (1) | 2025.08.23 |
|---|---|
| [Cilium] #5์ฃผ์ฐจ (3) ํด๋ฌ์คํฐ ๋ฉ์ฌ (1) | 2025.08.17 |
| [Cilium] #5์ฃผ์ฐจ (1) Cilium BGP + ECMP๋ฅผ ํ์ฉํ ์ฟ ๋ฒ๋คํฐ์ค ๋ก๋๋ฐธ๋ฐ์ ํธ๋ํฝ ๋ผ์ฐํ ์ค์ต (9) | 2025.08.15 |
| [Cilium] #4์ฃผ์ฐจ (3) ์ค๋ฒ๋ ์ด ๋คํธ์ํฌ (Geneve ๋ชจ๋) (1) | 2025.08.10 |
| [Cilium] #4์ฃผ์ฐจ (2) Service LB-IPAM (8) | 2025.08.10 |