Kubernetes Networking Genel Bakis-1

KUBEPROXY, CNI:

ADD
DEL
GET
VERSION

Podlar arasi Iletisim

Konteynir ve Interface

$ ip a4: eth0@if25: <BROADCAST,MULTICAST,UP,LOWER_UP,M-DOWN> mtu 1500 qdisc noqueue state UP
link/ether b6:81:2b:21:f8:f8 brd ff:ff:ff:ff:ff:ff
inet 100.127.249.201/32 scope global eth0
ip route ls |grep 100.101.135.85100.101.135.85 dev cali6e9890dac79 scope link

IPTABLES :

Kube-proxy ic networkteki paket yonetimini IPTABLES uzerinden yapmaktadir ancak ipvs uzerinden de yonetebilme opsiyonumuz vardir.

kubectl get svcNAME      TYPE        CLUSTER-IP       EXTERNAL-IP   PORT(S)   AGE
web-svc ClusterIP 100.68.152.235 <none> 80/TCP 41d
apiVersion: v1
kind: Service
metadata:
name: web-svc
spec:
selector:
app: web-service
ports:
- name: http
protocol: TCP
port: 80
targetPort: 80
iptables -t nat -nL
iptables -t nat -nL |grep -A 3 -B 3 100.101.135.81 => KUBE-SEP-QQFKKCBX2PLEDZRJ
iptables -t nat -nL |grep -A 3 -B 3 100.101.135.80 => KUBE-SEP-MOC4GDVGPEPVJSDN
iptables -t nat -nL |grep -A 3 -B 3 100.101.135.76 => KUBE-SEP-CYRXLGKEYPPWA5W5
Chain KUBE-SEP-QQFKKCBX2PLEDZRJ (1 references)
target prot opt source destination
KUBE-MARK-MASQ all -- 100.101.135.81 0.0.0.0/0 /* web-svc/web-svc: */
DNAT tcp -- 0.0.0.0/0 0.0.0.0/0 /* kuard/kuard: */ tcp to:100.101.135.81:80
-A KUBE-SVC-TBXKZ2STP32JFDA3-m comment --comment "robot-shop/mysql:mysql" -j KUBE-SEP-QQFKKCBX2PLEDZRJ

Pod to Service Iletisim (DNS)

kind: KubeletConfiguration
apiVersion: kubelet.config.k8s.io/v1beta1
authentication:
anonymous:
enabled: false
.... ...... ...
clusterDomain: "cluster.local"
clusterDNS:
- "10.32.0.237"

Pod to Node to Pod Iletisim

100.102.245.192/26 via   NODE1   dev tunl0 proto bird onlink
100.109.199.0/26 via NODE2 dev tunl0 proto bird onlink
100.120.175.0/26 via NODE3 dev tunl0 proto bird onlink

Sonuc

Kaynakca

--

--

PythonRubyLinux(❤)

Love podcasts or audiobooks? Learn on the go with our new app.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store