Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
SlideShare a Scribd company logo
Deep dive K8s Networking
Victor Morales
Victor Morales
• +15 yrs as a Software Engineer
• .NET, Java, python, Go programmer
• OpenStack, OPNFV, ONAP and CNCF
contributor.
https://about.me/electrocucaracha
Multicore Crisis
Named by Bob “SmoothSpan”
Warfield in 2007, the situation
in which the effects of Moore’s
Law have changed: while the
doubling of transistors per
chip continues, the by-product
is no longer faster processor
speeds but more cores per
chips instead.
https://smoothspan.com/2007/09/06/a-picture-of-the-multicore-crisis/
Response
Distributed computing
Fallacies of distributed computing
1. The network is reliable
2. Latency is zero
3. Bandwidth is infinite
4. The network is secure
5. Topology doesn't change
6. There is one administrator
7. Transport cost is zero
8. The network is homogeneous
https://blogs.oracle.com/developers/fallacies-of-distributed-systems
Network Latency
The Kubernetes
network model
• pods on a node can communicate with all pods on
all nodes without NAT
• agents on a node (e.g. system daemons, kubelet)
can communicate with all pods on that node
• pods in the host network of a node can
communicate with all pods on all nodes without
NAT
https://kubernetes.io/docs/concepts/cluster-
administration/networking/#the-kubernetes-
network-model
https://mrscriptkiddie.com/
what-is-network-address-
translationnat-working-
explained/
Kubernetes Demo
Cluster
controller
eth0
eth1
10.0.2.184/24
10.10.16.3/24
worker01
eth0
eth1
10.0.2.254/24
10.10.16.4/24
management
10.0.16.0/24
administration
10.0.2.0/24
worker02
eth0
eth1
10.0.2.83/24
10.10.16.5/24
Flannel CNI (Host Gateway Backend)
Flannel CNI
(controller)
$ kubectl logs $(kubectl get pods -A -o wide | grep "flannel.*controller" | awk '{ print $2}') -n kube-system
I0503 23:08:17.135980 1 main.go:518] Determining IP address of default interface
I0503 23:08:17.136722 1 main.go:531] Using interface with name eth0 and address 10.0.2.56
I0503 23:08:17.136731 1 main.go:548] Defaulting external address to interface address (10.0.2.56)
W0503 23:08:17.136748 1 client_config.go:517] Neither --kubeconfig nor --master was specified. Using the inClusterConfig. This might not work.
I0503 23:08:17.143884 1 kube.go:119] Waiting 10m0s for node controller to sync
I0503 23:08:17.143910 1 kube.go:306] Starting kube subnet manager
I0503 23:08:18.144214 1 kube.go:126] Node controller sync successful
I0503 23:08:18.144280 1 main.go:246] Created subnet manager: Kubernetes Subnet Manager - controller
I0503 23:08:18.144295 1 main.go:249] Installing signal handlers
I0503 23:08:18.144431 1 main.go:390] Found network config - Backend type: host-gw
I0503 23:08:18.195402 1 main.go:355] Current network or subnet (10.233.64.0/18, 10.233.64.0/24) is not equal to previous one (0.0.0.0/0, 0.0.0.0/0),
trying to recycle old iptables rules
I0503 23:08:18.225336 1 iptables.go:167] Deleting iptables rule: -s 0.0.0.0/0 -d 0.0.0.0/0 -j RETURN
I0503 23:08:18.228056 1 iptables.go:167] Deleting iptables rule: -s 0.0.0.0/0 ! -d 224.0.0.0/4 -j MASQUERADE --random-fully
I0503 23:08:18.229526 1 iptables.go:167] Deleting iptables rule: ! -s 0.0.0.0/0 -d 0.0.0.0/0 -j RETURN
I0503 23:08:18.230803 1 iptables.go:167] Deleting iptables rule: ! -s 0.0.0.0/0 -d 0.0.0.0/0 -j MASQUERADE --random-fully
I0503 23:08:18.232086 1 main.go:305] Setting up masking rules
I0503 23:08:18.232959 1 main.go:313] Changing default FORWARD chain policy to ACCEPT
I0503 23:08:18.233059 1 main.go:321] Wrote subnet file to /run/flannel/subnet.env
I0503 23:08:18.233069 1 main.go:325] Running backend.
I0503 23:08:18.233082 1 main.go:343] Waiting for all goroutines to exit
I0503 23:08:18.233114 1 route_network.go:53] Watching for new subnet leases
I0503 23:08:18.234944 1 iptables.go:145] Some iptables rules are missing; deleting and recreating rules
I0503 23:08:18.234958 1 iptables.go:167] Deleting iptables rule: -s 10.233.64.0/18 -d 10.233.64.0/18 -j RETURN
I0503 23:08:18.235938 1 iptables.go:167] Deleting iptables rule: -s 10.233.64.0/18 ! -d 224.0.0.0/4 -j MASQUERADE --random-fully
I0503 23:08:18.237037 1 iptables.go:167] Deleting iptables rule: ! -s 10.233.64.0/18 -d 10.233.64.0/24 -j RETURN
I0503 23:08:18.238218 1 iptables.go:167] Deleting iptables rule: ! -s 10.233.64.0/18 -d 10.233.64.0/18 -j MASQUERADE --random-fully
I0503 23:08:18.239041 1 iptables.go:155] Adding iptables rule: -s 10.233.64.0/18 -d 10.233.64.0/18 -j RETURN
I0503 23:08:18.240543 1 iptables.go:155] Adding iptables rule: -s 10.233.64.0/18 ! -d 224.0.0.0/4 -j MASQUERADE --random-fully
I0503 23:08:18.242157 1 iptables.go:155] Adding iptables rule: ! -s 10.233.64.0/18 -d 10.233.64.0/24 -j RETURN
I0503 23:08:18.243441 1 iptables.go:155] Adding iptables rule: ! -s 10.233.64.0/18 -d 10.233.64.0/18 -j MASQUERADE --random-fully
I0503 23:08:18.245337 1 iptables.go:145] Some iptables rules are missing; deleting and recreating rules
I0503 23:08:18.245348 1 iptables.go:167] Deleting iptables rule: -s 10.233.64.0/18 -j ACCEPT
I0503 23:08:18.245946 1 iptables.go:167] Deleting iptables rule: -d 10.233.64.0/18 -j ACCEPT
I0503 23:08:18.246539 1 iptables.go:155] Adding iptables rule: -s 10.233.64.0/18 -j ACCEPT
I0503 23:08:18.249302 1 iptables.go:155] Adding iptables rule: -d 10.233.64.0/18 -j ACCEPT
I0503 23:08:20.442619 1 route_network.go:85] Subnet added: 10.233.65.0/24 via 10.0.2.14
I0503 23:08:20.466725 1 route_network.go:85] Subnet added: 10.233.66.0/24 via 10.0.2.254
controller
eth0
10.0.2.56/24
Flannel Overlay
network:
10.233.64.0/18
Pod’s Subnet:
10.233.64.0/24
Flannel CNI
(worker01)
$ kubectl logs $(kubectl get pods -A -o wide | grep "flannel.*worker01" | awk '{ print $2}') -n kube-system
I0503 23:08:19.426175 1 main.go:518] Determining IP address of default interface
I0503 23:08:19.426440 1 main.go:531] Using interface with name eth0 and address 10.0.2.254
I0503 23:08:19.426455 1 main.go:548] Defaulting external address to interface address (10.0.2.254)
W0503 23:08:19.426470 1 client_config.go:517] Neither --kubeconfig nor --master was specified. Using the inClusterConfig. This might not work.
I0503 23:08:19.433617 1 kube.go:119] Waiting 10m0s for node controller to sync
I0503 23:08:19.433948 1 kube.go:306] Starting kube subnet manager
I0503 23:08:20.433999 1 kube.go:126] Node controller sync successful
I0503 23:08:20.434025 1 main.go:246] Created subnet manager: Kubernetes Subnet Manager - worker01
I0503 23:08:20.434030 1 main.go:249] Installing signal handlers
I0503 23:08:20.434090 1 main.go:390] Found network config - Backend type: host-gw
I0503 23:08:20.448682 1 main.go:355] Current network or subnet (10.233.64.0/18, 10.233.66.0/24) is not equal to previous one (0.0.0.0/0,
0.0.0.0/0), trying to recycle old iptables rules
I0503 23:08:20.484395 1 iptables.go:167] Deleting iptables rule: -s 0.0.0.0/0 -d 0.0.0.0/0 -j RETURN
I0503 23:08:20.485015 1 iptables.go:167] Deleting iptables rule: -s 0.0.0.0/0 ! -d 224.0.0.0/4 -j MASQUERADE --random-fully
I0503 23:08:20.485531 1 iptables.go:167] Deleting iptables rule: ! -s 0.0.0.0/0 -d 0.0.0.0/0 -j RETURN
I0503 23:08:20.486022 1 iptables.go:167] Deleting iptables rule: ! -s 0.0.0.0/0 -d 0.0.0.0/0 -j MASQUERADE --random-fully
I0503 23:08:20.486554 1 main.go:305] Setting up masking rules
I0503 23:08:20.486985 1 main.go:313] Changing default FORWARD chain policy to ACCEPT
I0503 23:08:20.487040 1 main.go:321] Wrote subnet file to /run/flannel/subnet.env
I0503 23:08:20.487045 1 main.go:325] Running backend.
I0503 23:08:20.487052 1 main.go:343] Waiting for all goroutines to exit
I0503 23:08:20.487064 1 route_network.go:53] Watching for new subnet leases
I0503 23:08:20.487236 1 route_network.go:85] Subnet added: 10.233.64.0/24 via 10.0.2.56
I0503 23:08:20.487378 1 route_network.go:85] Subnet added: 10.233.65.0/24 via 10.0.2.14
I0503 23:08:20.488369 1 iptables.go:145] Some iptables rules are missing; deleting and recreating rules
I0503 23:08:20.488376 1 iptables.go:167] Deleting iptables rule: -s 10.233.64.0/18 -d 10.233.64.0/18 -j RETURN
I0503 23:08:20.496685 1 iptables.go:145] Some iptables rules are missing; deleting and recreating rules
I0503 23:08:20.496696 1 iptables.go:167] Deleting iptables rule: -s 10.233.64.0/18 -j ACCEPT
I0503 23:08:20.496766 1 iptables.go:167] Deleting iptables rule: -s 10.233.64.0/18 ! -d 224.0.0.0/4 -j MASQUERADE --random-fully
I0503 23:08:20.497367 1 iptables.go:167] Deleting iptables rule: -d 10.233.64.0/18 -j ACCEPT
I0503 23:08:20.497888 1 iptables.go:155] Adding iptables rule: -s 10.233.64.0/18 -j ACCEPT
I0503 23:08:20.498893 1 iptables.go:167] Deleting iptables rule: ! -s 10.233.64.0/18 -d 10.233.66.0/24 -j RETURN
I0503 23:08:20.499455 1 iptables.go:167] Deleting iptables rule: ! -s 10.233.64.0/18 -d 10.233.64.0/18 -j MASQUERADE --random-fully
I0503 23:08:20.500091 1 iptables.go:155] Adding iptables rule: -s 10.233.64.0/18 -d 10.233.64.0/18 -j RETURN
I0503 23:08:20.501584 1 iptables.go:155] Adding iptables rule: -d 10.233.64.0/18 -j ACCEPT
I0503 23:08:20.502204 1 iptables.go:155] Adding iptables rule: -s 10.233.64.0/18 ! -d 224.0.0.0/4 -j MASQUERADE --random-fully
I0503 23:08:20.508007 1 iptables.go:155] Adding iptables rule: ! -s 10.233.64.0/18 -d 10.233.66.0/24 -j RETURN
I0503 23:08:20.509166 1 iptables.go:155] Adding iptables rule: ! -s 10.233.64.0/18 -d 10.233.64.0/18 -j MASQUERADE --random-fully
worker01
eth0
10.0.2.254/24
Flannel Overlay
network:
10.233.64.0/18
Pod’s Subnet:
10.233.66.0/24
Flannel CNI
(worker02)
$ kubectl logs $(kubectl get pods -A -o wide | grep "flannel.*worker02" | awk '{ print $2}') -n kube-system
I0503 23:08:19.395547 1 main.go:518] Determining IP address of default interface
I0503 23:08:19.395834 1 main.go:531] Using interface with name eth0 and address 10.0.2.14
I0503 23:08:19.395849 1 main.go:548] Defaulting external address to interface address (10.0.2.14)
W0503 23:08:19.395859 1 client_config.go:517] Neither --kubeconfig nor --master was specified. Using the inClusterConfig. This might not work.
I0503 23:08:19.403033 1 kube.go:119] Waiting 10m0s for node controller to sync
I0503 23:08:19.403392 1 kube.go:306] Starting kube subnet manager
I0503 23:08:20.403454 1 kube.go:126] Node controller sync successful
I0503 23:08:20.403478 1 main.go:246] Created subnet manager: Kubernetes Subnet Manager - worker02
I0503 23:08:20.403482 1 main.go:249] Installing signal handlers
I0503 23:08:20.403525 1 main.go:390] Found network config - Backend type: host-gw
I0503 23:08:20.424202 1 main.go:355] Current network or subnet (10.233.64.0/18, 10.233.65.0/24) is not equal to previous one (0.0.0.0/0, 0.0.0.0/0),
trying to recycle old iptables rules
I0503 23:08:20.439644 1 iptables.go:167] Deleting iptables rule: -s 0.0.0.0/0 -d 0.0.0.0/0 -j RETURN
I0503 23:08:20.440832 1 iptables.go:167] Deleting iptables rule: -s 0.0.0.0/0 ! -d 224.0.0.0/4 -j MASQUERADE --random-fully
I0503 23:08:20.441848 1 iptables.go:167] Deleting iptables rule: ! -s 0.0.0.0/0 -d 0.0.0.0/0 -j RETURN
I0503 23:08:20.442882 1 iptables.go:167] Deleting iptables rule: ! -s 0.0.0.0/0 -d 0.0.0.0/0 -j MASQUERADE --random-fully
I0503 23:08:20.443786 1 main.go:305] Setting up masking rules
I0503 23:08:20.444598 1 main.go:313] Changing default FORWARD chain policy to ACCEPT
I0503 23:08:20.444686 1 main.go:321] Wrote subnet file to /run/flannel/subnet.env
I0503 23:08:20.444695 1 main.go:325] Running backend.
I0503 23:08:20.444706 1 main.go:343] Waiting for all goroutines to exit
I0503 23:08:20.444729 1 route_network.go:53] Watching for new subnet leases
I0503 23:08:20.444979 1 route_network.go:85] Subnet added: 10.233.64.0/24 via 10.0.2.56
I0503 23:08:20.445165 1 route_network.go:85] Subnet added: 10.233.66.0/24 via 10.0.2.254
I0503 23:08:20.446388 1 iptables.go:145] Some iptables rules are missing; deleting and recreating rules
I0503 23:08:20.446397 1 iptables.go:167] Deleting iptables rule: -s 10.233.64.0/18 -d 10.233.64.0/18 -j RETURN
I0503 23:08:20.446864 1 iptables.go:145] Some iptables rules are missing; deleting and recreating rules
I0503 23:08:20.446872 1 iptables.go:167] Deleting iptables rule: -s 10.233.64.0/18 -j ACCEPT
I0503 23:08:20.447285 1 iptables.go:167] Deleting iptables rule: -s 10.233.64.0/18 ! -d 224.0.0.0/4 -j MASQUERADE --random-fully
I0503 23:08:20.447701 1 iptables.go:167] Deleting iptables rule: -d 10.233.64.0/18 -j ACCEPT
I0503 23:08:20.448317 1 iptables.go:167] Deleting iptables rule: ! -s 10.233.64.0/18 -d 10.233.65.0/24 -j RETURN
I0503 23:08:20.448802 1 iptables.go:155] Adding iptables rule: -s 10.233.64.0/18 -j ACCEPT
I0503 23:08:20.449289 1 iptables.go:167] Deleting iptables rule: ! -s 10.233.64.0/18 -d 10.233.64.0/18 -j MASQUERADE --random-fully
I0503 23:08:20.450172 1 iptables.go:155] Adding iptables rule: -s 10.233.64.0/18 -d 10.233.64.0/18 -j RETURN
I0503 23:08:20.450643 1 iptables.go:155] Adding iptables rule: -d 10.233.64.0/18 -j ACCEPT
I0503 23:08:20.477083 1 iptables.go:155] Adding iptables rule: -s 10.233.64.0/18 ! -d 224.0.0.0/4 -j MASQUERADE --random-fully
I0503 23:08:20.478562 1 iptables.go:155] Adding iptables rule: ! -s 10.233.64.0/18 -d 10.233.65.0/24 -j RETURN
I0503 23:08:20.480024 1 iptables.go:155] Adding iptables rule: ! -s 10.233.64.0/18 -d 10.233.64.0/18 -j MASQUERADE --random-fully
worker02
eth0
10.0.2.14/24
Flannel Overlay
network:
10.233.64.0/18
Pod’s Subnet:
10.233.65.0/24
Scenario Pod-to-Pod
Same node
Demo 1
worker01
eth0
pod1
10.233.66.4/24
eth0
client
pod2
eth0
server
10.233.66.5/24
$ kubectl get pods -o custom-columns="NAME:metadata.name,IP:status.podIP,NODE:spec.nodeName"
NAME IP NODE
pod1 10.233.66.4 worker01
pod2 10.233.66.5 worker01
ssh worker01
(PIDs/net ns)
worker01
eth0
pod1
10.233.66.4/24
eth0
client pause
pod2
10.233.66.5/24
server pause
$ for name in $(sudo docker ps --filter "name=pod*" --format "{{.Names}}"); do
> echo "NAME:$name $(sudo docker inspect $name --format 'PID:{{.State.Pid}} CMD:{{.Path}}')"
> done
NAME:k8s_server_pod2_default_7e0da6ce-2693-448a-9def-55e25a53a9f8_0 PID:23231 CMD:sleep
NAME:k8s_client_pod1_default_7f3063da-2e86-466e-812b-b45b8791af60_0 PID:23173 CMD:sleep
NAME:k8s_POD_pod2_default_7e0da6ce-2693-448a-9def-55e25a53a9f8_0 PID:22936 CMD:/pause
NAME:k8s_POD_pod1_default_7f3063da-2e86-466e-812b-b45b8791af60_0 PID:22902 CMD:/pause
$ sudo lsns --type net
NS TYPE NPROCS PID USER COMMAND
4026531993 net 139 1 root /sbin/init
4026532219 net 1 892 root /usr/sbin/haveged --Foreground --verbose=1 -w 1024
4026532321 net 2 17306 root /pause
4026532401 net 2 17675 root /pause
4026532481 net 2 22902 root /pause
4026532549 net 2 22936 root /pause
10.0.2.254/24
eth0
worker01
4026532481
10.233.66.4/24
eth0
23173 22902
4026532549
10.233.66.5/24
23231 22936
eth0
4026531993
eth0 10.0.2.254/24
ssh worker01
(veths)
$ sudo nsenter -t 23173 -n ip a s eth0
3: eth0@if10: <BROADCAST,MULTICAST,UP,LOWER_UP,M-DOWN> mtu 1500 qdisc noqueue
link/ether 22:3d:13:16:4d:91 brd ff:ff:ff:ff:ff:ff
inet 10.233.65.5/24 brd 10.233.66.255 scope global eth0
valid_lft forever preferred_lft forever
$ sudo nsenter -t 23231 -n ip a s eth0
3: eth0@if11: <BROADCAST,MULTICAST,UP,LOWER_UP,M-DOWN> mtu 1500 qdisc noqueue
link/ether 4e:45:9e:07:aa:73 brd ff:ff:ff:ff:ff:ff
inet 10.233.65.6/24 brd 10.233.66.255 scope global eth0
valid_lft forever preferred_lft forever
$ ip add show vethd2ff1e8f
10: vethd2ff1e8f@if3: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue master cni0 state UP group default
link/ether de:71:37:62:8c:81 brd ff:ff:ff:ff:ff:ff link-netnsid 2
$ ip add show vethedf4daba
11: vethedf4daba@if3: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue master cni0 state UP group default
link/ether 6e:38:5d:c3:1c:fe brd ff:ff:ff:ff:ff:ff link-netnsid 3
worker01
4026532481
10.233.66.4/24
eth0@if10
23173 22902
4026532549
10.233.66.5/24
23231 22936
4026531993
eth0 10.0.2.254/24
eth0@if11
vethd2ff1e8f vethedf4daba
de:71:37:62:8c:81 6e:38:5d:c3:1c:fe
ssh worker01
(bridge)
worker01
4026532481
10.233.66.4/24
eth0@if10
23173 22902
4026532549
10.233.66.5/24
23231 22936
4026531993 eth0
10.0.2.254/24
eth0@if11
vethd2ff1e8f vethedf4daba
cni0
$ ip addr show cni0
7: cni0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue
state UP group default qlen 1000
link/ether 2e:c5:8a:c4:ad:59 brd ff:ff:ff:ff:ff:ff
inet 10.233.66.1/24 brd 10.233.66.255 scope global cni0
valid_lft forever preferred_lft forever
$ brctl show cni0
bridge name bridge id STP enabled interfaces
cni0 8000.1af5b56bb7bd no veth08082f56
vethd2ff1e8f
vethe6c8889e
vethedf4daba
$ brctl showmacs cni0
port no mac addr is local? ageing timer
1 12:ec:de:82:22:e9 yes 0.00
1 12:ec:de:82:22:e9 yes 0.00
2 42:ed:db:49:ce:24 yes 0.00
2 42:ed:db:49:ce:24 yes 0.00
4 6e:38:5d:c3:1c:fe yes 0.00
4 6e:38:5d:c3:1c:fe yes 0.00
2 9e:93:b1:9b:10:1f no 1.16
3 de:71:37:62:8c:81 yes 0.00
3 de:71:37:62:8c:81 yes 0.00
1 ea:56:ef:33:2a:9a no 4.16
de:71:37:62:8c:81 6e:38:5d:c3:1c:fe
10.233.66.1/24
ssh worker01 (routes)
worker01
4026532481
10.233.66.4/24
eth0@if10
23173 22902
4026532549
10.233.66.5/24
23231 22936
4026531993
eth0 10.0.2.254/24
eth0@if11
vethd2ff1e8f vethedf4daba
cni0
$ sudo nsenter -t 23173 -n ping -c 1 10.233.66.5
PING 10.233.66.5 (10.233.66.5) 56(84) bytes of data.
64 bytes from 10.233.66.5: icmp_seq=1 ttl=64 time=0.154 ms
--- 10.233.66.5 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.154/0.154/0.154/0.000 ms
$ sudo nsenter -t 23173 -n ip route
default via 10.233.66.1 dev eth0
10.233.64.0/18 via 10.233.66.1 dev eth0
10.233.66.0/24 dev eth0 proto kernel scope link src 10.233.66.4
$ ip route
default via 10.0.2.1 dev eth0 proto dhcp src 10.0.2.254 metric 100
10.0.2.0/24 dev eth0 proto kernel scope link src 10.0.2.254
10.0.2.1 dev eth0 proto dhcp scope link src 10.0.2.254 metric 100
10.10.16.0/24 dev eth1 proto kernel scope link src 10.10.16.4
10.233.64.0/24 via 10.0.2.56 dev eth0
10.233.65.0/24 via 10.0.2.14 dev eth0
10.233.66.0/24 dev cni0 proto kernel scope link src 10.233.66.1
172.17.0.0/16 dev docker0 proto kernel scope link src 172.17.0.1
linkdown
10.233.66.1/24
Scenario Pod-to-Pod
Different nodes
Demo 2
worker01
eth0
pod1
10.233.66.6/24
eth0
client
$ kubectl get pods -o custom-columns="NAME:metadata.name,IP:status.podIP,NODE:spec.nodeName"
NAME IP NODE
pod1 10.233.66.6 worker01
pod2 10.233.65.5 worker02
worker02
eth0
pod2
10.233.65.5/24
eth0
server
ssh worker01 (routes)
worker01
4026532481
10.233.66.6/24
eth0@if12
24330 24200
4026531993
eth0
10.0.2.254/24
veth24e469fc
cni0
$ sudo nsenter -t 24330 -n traceroute 10.233.65.5
traceroute to 10.233.65.5 (10.233.65.5), 30 hops max, 60 byte packets
1 10.233.66.1 (10.233.66.1) 2.161 ms 1.855 ms 1.775 ms
2 10.0.2.14 (10.0.2.14) 1.719 ms 1.603 ms 1.515 ms
3 10.233.65.5 (10.233.65.5) 1.447 ms 1.336 ms 3.424 ms
$ sudo nsenter -t 23173 -n ip route
default via 10.233.66.1 dev eth0
10.233.64.0/18 via 10.233.66.1 dev eth0
10.233.66.0/24 dev eth0 proto kernel scope link src 10.233.66.4
$ ip route
default via 10.0.2.1 dev eth0 proto dhcp src 10.0.2.254 metric 100
10.0.2.0/24 dev eth0 proto kernel scope link src 10.0.2.254
10.0.2.1 dev eth0 proto dhcp scope link src 10.0.2.254 metric 100
10.10.16.0/24 dev eth1 proto kernel scope link src 10.10.16.4
10.233.64.0/24 via 10.0.2.56 dev eth0
10.233.65.0/24 via 10.0.2.14 dev eth0
10.233.66.0/24 dev cni0 proto kernel scope link src 10.233.66.1
172.17.0.0/16 dev docker0 proto kernel scope link src 172.17.0.1 linkdown
administration
10.0.2.0/24
worker02
4026532554
10.233.65.5/24
eth0@if11
22403 22281
4026531993
eth0
10.0.2.14/24
vethf6de8b6e
cni0
10.233.66.1/24 10.233.65.1/24
Flannel CNI
Backends
worker01
4026532481
10.233.66.6/24
eth0@if12
24330 24200
4026531993
eth0
10.0.2.254/24
veth24e469fc
cni0
administration
10.0.2.0/24
worker02
4026532554
10.233.65.5/24
eth0@if11
22403 22281
4026531993
eth0
10.0.2.14/24
vethf6de8b6e
cni0
Host Gateway
worker01
4026532481
10.233.66.6/24
eth0@if12
24330 24200
4026531993
eth0
10.0.2.254/24
veth24e469fc
cni0
administration
10.0.2.0/24
worker02
4026532554
10.233.65.5/24
eth0@if11
22403 22281
4026531993
eth0
10.0.2.14/24
vethf6de8b6e
cni0
VXLAN
flannel.1 flannel.1
VXLAN tunneling
ssh worker01(routes)
$ ip route
default via 10.0.2.1 dev eth0 proto dhcp src 10.0.2.254 metric 100
10.0.2.0/24 dev eth0 proto kernel scope link src 10.0.2.254
10.0.2.1 dev eth0 proto dhcp scope link src 10.0.2.254 metric 100
10.10.16.0/24 dev eth1 proto kernel scope link src 10.10.16.4
10.233.64.0/24 via 10.233.64.0 dev flannel.1 onlink
10.233.65.0/24 via 10.233.65.0 dev flannel.1 onlink
10.233.66.0/24 dev cni0 proto kernel scope link src 10.233.66.1
172.17.0.0/16 dev docker0 proto kernel scope link src 172.17.0.1 linkdown
$ ip neigh show dev flannel.1
10.233.64.0 lladdr fe:f7:38:5b:0a:4d PERMANENT
10.233.65.0 lladdr a2:c1:bf:3d:c9:7b PERMANENT
$ bridge fdb show dev flannel.1
fe:f7:38:5b:0a:4d dst 10.0.2.56 self permanent
a2:c1:bf:3d:c9:7b dst 10.0.2.14 self permanent
$ ip -d link show flannel.1
5: flannel.1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1450 qdisc noqueue state UNKNOWN mode DEFAULT group default
link/ether f6:22:6b:4b:11:48 brd ff:ff:ff:ff:ff:ff promiscuity 0
vxlan id 1 local 10.0.2.207 dev eth0 srcport 0 0 dstport 8472 nolearning ttl inherit ageing 300 udpcsum noudp6zerocsumtx
noudp6zerocsumrx addrgenmode eui64 numtxqueues 1 numrxqueues 1 gso_max_size 65536 gso_max_segs 65535
Virtual eXtensible Local Area Networking
(VXLAN)
The VXLAN protocol is a tunnelling protocol designed to solve the
problem of limited VLAN IDs (4096) in IEEE 802.1q. With VXLAN the
size of the identifier is expanded to 24 bits (16777216).
https://www.kernel.org/doc/html/latest/networking/vxlan.html
https://www.beyondcli.com/101/vxlan-vsphere-vcns-vs-nsx-for-vsphere/
iperf results
Host Gateway VXLAN
Host Gateway offers 5x higher throughput than VXLAN backend.
Slow Responses
https://pragprog.com/titles/mnee2/release-it-second-edition/
Let threads block for minutes before throwing exceptions.
The blocked thread can’t process other transactions, so
overall capacity is reduced.
• Slow responses trigger Cascading Failures
• For websites, slow responses cause more traffic
• Consider Fail Fast
• Hunt for memory leaks or resource contention
Q&A
https://github.com/electrocucaracha/krd/tree/master/docs/src
Backup
Double overlay
https://www.eficode.com/blog/debugging-kubernetes-networking

More Related Content

What's hot

Openstack trystack
Openstack   trystack Openstack   trystack
Openstack trystack
Eueung Mulyana
 
Minikube Workshop Handout
Minikube Workshop HandoutMinikube Workshop Handout
Minikube Workshop Handout
Alfie Chen
 
Docker at Digital Ocean
Docker at Digital OceanDocker at Digital Ocean
Docker at Digital Ocean
Cloud 66
 
SaltConf 2015: Salt stack at web scale: Better, Stronger, Faster
SaltConf 2015: Salt stack at web scale: Better, Stronger, FasterSaltConf 2015: Salt stack at web scale: Better, Stronger, Faster
SaltConf 2015: Salt stack at web scale: Better, Stronger, Faster
Thomas Jackson
 
Running CentOS on the Facebook fleet
Running CentOS on the Facebook fleetRunning CentOS on the Facebook fleet
Running CentOS on the Facebook fleet
Davide Cavalca
 
Satellite 6 - Pupet Introduction
Satellite 6 - Pupet IntroductionSatellite 6 - Pupet Introduction
Satellite 6 - Pupet Introduction
Michael Lessard
 
Puppet in the Pipeline
Puppet in the PipelinePuppet in the Pipeline
Puppet in the Pipeline
Puppet
 
Packaging Strategy for Community Openstack and Implementation Reference | Hoj...
Packaging Strategy for Community Openstack and Implementation Reference | Hoj...Packaging Strategy for Community Openstack and Implementation Reference | Hoj...
Packaging Strategy for Community Openstack and Implementation Reference | Hoj...
Vietnam Open Infrastructure User Group
 
Puppet Camp Paris 2015: Continuous Integration of Puppet Code (Intermediate)
Puppet Camp Paris 2015: Continuous Integration of Puppet Code (Intermediate) Puppet Camp Paris 2015: Continuous Integration of Puppet Code (Intermediate)
Puppet Camp Paris 2015: Continuous Integration of Puppet Code (Intermediate)
Puppet
 
Openstack bug list
Openstack bug listOpenstack bug list
Openstack bug list
openstackcisco
 
Moving to Nova Cells without Destroying the World
Moving to Nova Cells without Destroying the WorldMoving to Nova Cells without Destroying the World
Moving to Nova Cells without Destroying the World
Mike Dorman
 
Puppet Camp London Fall 2015 - Service Discovery and Puppet
Puppet Camp London Fall 2015 - Service Discovery and PuppetPuppet Camp London Fall 2015 - Service Discovery and Puppet
Puppet Camp London Fall 2015 - Service Discovery and Puppet
Marc Cluet
 
Nginx Essential
Nginx EssentialNginx Essential
Nginx Essential
Gong Haibing
 
Puppet Camp Berlin 2015: Andrea Giardini | Configuration Management @ CERN: G...
Puppet Camp Berlin 2015: Andrea Giardini | Configuration Management @ CERN: G...Puppet Camp Berlin 2015: Andrea Giardini | Configuration Management @ CERN: G...
Puppet Camp Berlin 2015: Andrea Giardini | Configuration Management @ CERN: G...
NETWAYS
 
Saltstack with Zabbix
Saltstack with ZabbixSaltstack with Zabbix
Saltstack with Zabbix
Christian McHugh
 
Consul administration at scale
Consul administration at scaleConsul administration at scale
Consul administration at scale
Pierre Souchay
 
PAC 2019 virtual Scott Moore
PAC 2019  virtual   Scott Moore PAC 2019  virtual   Scott Moore
PAC 2019 virtual Scott Moore
Neotys
 
Sdn command line controller lab
Sdn command line controller labSdn command line controller lab
Sdn command line controller lab
Guedda houssem eddin
 
How to monitor NGINX
How to monitor NGINXHow to monitor NGINX
How to monitor NGINX
Server Density
 
Saltcheck: a tool in the salt toolbox
Saltcheck: a tool in the salt toolboxSaltcheck: a tool in the salt toolbox
Saltcheck: a tool in the salt toolbox
Christian McHugh
 

What's hot (20)

Openstack trystack
Openstack   trystack Openstack   trystack
Openstack trystack
 
Minikube Workshop Handout
Minikube Workshop HandoutMinikube Workshop Handout
Minikube Workshop Handout
 
Docker at Digital Ocean
Docker at Digital OceanDocker at Digital Ocean
Docker at Digital Ocean
 
SaltConf 2015: Salt stack at web scale: Better, Stronger, Faster
SaltConf 2015: Salt stack at web scale: Better, Stronger, FasterSaltConf 2015: Salt stack at web scale: Better, Stronger, Faster
SaltConf 2015: Salt stack at web scale: Better, Stronger, Faster
 
Running CentOS on the Facebook fleet
Running CentOS on the Facebook fleetRunning CentOS on the Facebook fleet
Running CentOS on the Facebook fleet
 
Satellite 6 - Pupet Introduction
Satellite 6 - Pupet IntroductionSatellite 6 - Pupet Introduction
Satellite 6 - Pupet Introduction
 
Puppet in the Pipeline
Puppet in the PipelinePuppet in the Pipeline
Puppet in the Pipeline
 
Packaging Strategy for Community Openstack and Implementation Reference | Hoj...
Packaging Strategy for Community Openstack and Implementation Reference | Hoj...Packaging Strategy for Community Openstack and Implementation Reference | Hoj...
Packaging Strategy for Community Openstack and Implementation Reference | Hoj...
 
Puppet Camp Paris 2015: Continuous Integration of Puppet Code (Intermediate)
Puppet Camp Paris 2015: Continuous Integration of Puppet Code (Intermediate) Puppet Camp Paris 2015: Continuous Integration of Puppet Code (Intermediate)
Puppet Camp Paris 2015: Continuous Integration of Puppet Code (Intermediate)
 
Openstack bug list
Openstack bug listOpenstack bug list
Openstack bug list
 
Moving to Nova Cells without Destroying the World
Moving to Nova Cells without Destroying the WorldMoving to Nova Cells without Destroying the World
Moving to Nova Cells without Destroying the World
 
Puppet Camp London Fall 2015 - Service Discovery and Puppet
Puppet Camp London Fall 2015 - Service Discovery and PuppetPuppet Camp London Fall 2015 - Service Discovery and Puppet
Puppet Camp London Fall 2015 - Service Discovery and Puppet
 
Nginx Essential
Nginx EssentialNginx Essential
Nginx Essential
 
Puppet Camp Berlin 2015: Andrea Giardini | Configuration Management @ CERN: G...
Puppet Camp Berlin 2015: Andrea Giardini | Configuration Management @ CERN: G...Puppet Camp Berlin 2015: Andrea Giardini | Configuration Management @ CERN: G...
Puppet Camp Berlin 2015: Andrea Giardini | Configuration Management @ CERN: G...
 
Saltstack with Zabbix
Saltstack with ZabbixSaltstack with Zabbix
Saltstack with Zabbix
 
Consul administration at scale
Consul administration at scaleConsul administration at scale
Consul administration at scale
 
PAC 2019 virtual Scott Moore
PAC 2019  virtual   Scott Moore PAC 2019  virtual   Scott Moore
PAC 2019 virtual Scott Moore
 
Sdn command line controller lab
Sdn command line controller labSdn command line controller lab
Sdn command line controller lab
 
How to monitor NGINX
How to monitor NGINXHow to monitor NGINX
How to monitor NGINX
 
Saltcheck: a tool in the salt toolbox
Saltcheck: a tool in the salt toolboxSaltcheck: a tool in the salt toolbox
Saltcheck: a tool in the salt toolbox
 

Similar to Deep dive networking

Ccnp enterprise workbook v1.0 completed till weigth
Ccnp enterprise workbook v1.0   completed till weigthCcnp enterprise workbook v1.0   completed till weigth
Ccnp enterprise workbook v1.0 completed till weigth
SagarR24
 
Workbook dtp added ccnp enterprise workbook v1.0
Workbook dtp added   ccnp enterprise workbook v1.0Workbook dtp added   ccnp enterprise workbook v1.0
Workbook dtp added ccnp enterprise workbook v1.0
SagarR24
 
Ccnp enterprise workbook v1.0 ospf-updated
Ccnp enterprise workbook v1.0 ospf-updatedCcnp enterprise workbook v1.0 ospf-updated
Ccnp enterprise workbook v1.0 ospf-updated
SagarR24
 
Workbook added etherchannel ccnp enterprise workbook v1.0
Workbook added etherchannel ccnp enterprise workbook v1.0Workbook added etherchannel ccnp enterprise workbook v1.0
Workbook added etherchannel ccnp enterprise workbook v1.0
SagarR24
 
Ccnp enterprise workbook v1.0 added hsrpv1
Ccnp enterprise workbook v1.0 added hsrpv1Ccnp enterprise workbook v1.0 added hsrpv1
Ccnp enterprise workbook v1.0 added hsrpv1
SagarR24
 
Как понять, что происходит на сервере? / Александр Крижановский (NatSys Lab.,...
Как понять, что происходит на сервере? / Александр Крижановский (NatSys Lab.,...Как понять, что происходит на сервере? / Александр Крижановский (NatSys Lab.,...
Как понять, что происходит на сервере? / Александр Крижановский (NatSys Lab.,...
Ontico
 
Linux boot-time
Linux boot-timeLinux boot-time
Linux boot-time
Andrea Righi
 
vBACD - Introduction to Opscode Chef - 2/29
vBACD - Introduction to Opscode Chef - 2/29vBACD - Introduction to Opscode Chef - 2/29
vBACD - Introduction to Opscode Chef - 2/29
CloudStack - Open Source Cloud Computing Project
 
Day 11 eigrp
Day 11 eigrpDay 11 eigrp
Day 11 eigrp
CYBERINTELLIGENTS
 
Rstp all guards workbook
Rstp all guards workbookRstp all guards workbook
Rstp all guards workbook
SagarR24
 
metadatacoreProperties.xml Model 2017-10-12T151537Z grv334.docx
metadatacoreProperties.xml  Model 2017-10-12T151537Z grv334.docxmetadatacoreProperties.xml  Model 2017-10-12T151537Z grv334.docx
metadatacoreProperties.xml Model 2017-10-12T151537Z grv334.docx
ARIV4
 
C&C Botnet Factory
C&C Botnet FactoryC&C Botnet Factory
C&C Botnet Factory
Nullbyte Security Conference
 
Debugging the Cloud Foundry Routing Tier
Debugging the Cloud Foundry Routing TierDebugging the Cloud Foundry Routing Tier
Debugging the Cloud Foundry Routing Tier
VMware Tanzu
 
Linux 系統管理與安全:進階系統管理系統防駭與資訊安全
Linux 系統管理與安全:進階系統管理系統防駭與資訊安全Linux 系統管理與安全:進階系統管理系統防駭與資訊安全
Linux 系統管理與安全:進階系統管理系統防駭與資訊安全
維泰 蔡
 
001 network toi_basics_v1
001 network toi_basics_v1001 network toi_basics_v1
001 network toi_basics_v1
Hisao Tsujimura
 
Ccnp enterprise workbook v1.0 eigrp
Ccnp enterprise workbook v1.0 eigrpCcnp enterprise workbook v1.0 eigrp
Ccnp enterprise workbook v1.0 eigrp
SagarR24
 
Ccnp enterprise workbook hsrp vrrp glbp
Ccnp enterprise workbook   hsrp vrrp glbpCcnp enterprise workbook   hsrp vrrp glbp
Ccnp enterprise workbook hsrp vrrp glbp
SagarR24
 
Debugging linux issues with eBPF
Debugging linux issues with eBPFDebugging linux issues with eBPF
Debugging linux issues with eBPF
Ivan Babrou
 
[OpenStack 하반기 스터디] HA using DVR
[OpenStack 하반기 스터디] HA using DVR[OpenStack 하반기 스터디] HA using DVR
[OpenStack 하반기 스터디] HA using DVR
OpenStack Korea Community
 
ProxySQL & PXC(Query routing and Failover Test)
ProxySQL & PXC(Query routing and Failover Test)ProxySQL & PXC(Query routing and Failover Test)
ProxySQL & PXC(Query routing and Failover Test)
YoungHeon (Roy) Kim
 

Similar to Deep dive networking (20)

Ccnp enterprise workbook v1.0 completed till weigth
Ccnp enterprise workbook v1.0   completed till weigthCcnp enterprise workbook v1.0   completed till weigth
Ccnp enterprise workbook v1.0 completed till weigth
 
Workbook dtp added ccnp enterprise workbook v1.0
Workbook dtp added   ccnp enterprise workbook v1.0Workbook dtp added   ccnp enterprise workbook v1.0
Workbook dtp added ccnp enterprise workbook v1.0
 
Ccnp enterprise workbook v1.0 ospf-updated
Ccnp enterprise workbook v1.0 ospf-updatedCcnp enterprise workbook v1.0 ospf-updated
Ccnp enterprise workbook v1.0 ospf-updated
 
Workbook added etherchannel ccnp enterprise workbook v1.0
Workbook added etherchannel ccnp enterprise workbook v1.0Workbook added etherchannel ccnp enterprise workbook v1.0
Workbook added etherchannel ccnp enterprise workbook v1.0
 
Ccnp enterprise workbook v1.0 added hsrpv1
Ccnp enterprise workbook v1.0 added hsrpv1Ccnp enterprise workbook v1.0 added hsrpv1
Ccnp enterprise workbook v1.0 added hsrpv1
 
Как понять, что происходит на сервере? / Александр Крижановский (NatSys Lab.,...
Как понять, что происходит на сервере? / Александр Крижановский (NatSys Lab.,...Как понять, что происходит на сервере? / Александр Крижановский (NatSys Lab.,...
Как понять, что происходит на сервере? / Александр Крижановский (NatSys Lab.,...
 
Linux boot-time
Linux boot-timeLinux boot-time
Linux boot-time
 
vBACD - Introduction to Opscode Chef - 2/29
vBACD - Introduction to Opscode Chef - 2/29vBACD - Introduction to Opscode Chef - 2/29
vBACD - Introduction to Opscode Chef - 2/29
 
Day 11 eigrp
Day 11 eigrpDay 11 eigrp
Day 11 eigrp
 
Rstp all guards workbook
Rstp all guards workbookRstp all guards workbook
Rstp all guards workbook
 
metadatacoreProperties.xml Model 2017-10-12T151537Z grv334.docx
metadatacoreProperties.xml  Model 2017-10-12T151537Z grv334.docxmetadatacoreProperties.xml  Model 2017-10-12T151537Z grv334.docx
metadatacoreProperties.xml Model 2017-10-12T151537Z grv334.docx
 
C&C Botnet Factory
C&C Botnet FactoryC&C Botnet Factory
C&C Botnet Factory
 
Debugging the Cloud Foundry Routing Tier
Debugging the Cloud Foundry Routing TierDebugging the Cloud Foundry Routing Tier
Debugging the Cloud Foundry Routing Tier
 
Linux 系統管理與安全:進階系統管理系統防駭與資訊安全
Linux 系統管理與安全:進階系統管理系統防駭與資訊安全Linux 系統管理與安全:進階系統管理系統防駭與資訊安全
Linux 系統管理與安全:進階系統管理系統防駭與資訊安全
 
001 network toi_basics_v1
001 network toi_basics_v1001 network toi_basics_v1
001 network toi_basics_v1
 
Ccnp enterprise workbook v1.0 eigrp
Ccnp enterprise workbook v1.0 eigrpCcnp enterprise workbook v1.0 eigrp
Ccnp enterprise workbook v1.0 eigrp
 
Ccnp enterprise workbook hsrp vrrp glbp
Ccnp enterprise workbook   hsrp vrrp glbpCcnp enterprise workbook   hsrp vrrp glbp
Ccnp enterprise workbook hsrp vrrp glbp
 
Debugging linux issues with eBPF
Debugging linux issues with eBPFDebugging linux issues with eBPF
Debugging linux issues with eBPF
 
[OpenStack 하반기 스터디] HA using DVR
[OpenStack 하반기 스터디] HA using DVR[OpenStack 하반기 스터디] HA using DVR
[OpenStack 하반기 스터디] HA using DVR
 
ProxySQL & PXC(Query routing and Failover Test)
ProxySQL & PXC(Query routing and Failover Test)ProxySQL & PXC(Query routing and Failover Test)
ProxySQL & PXC(Query routing and Failover Test)
 

More from Victor Morales

KuberTENes Birthday Bash Guadalajara - K8sGPT first impressions
KuberTENes Birthday Bash Guadalajara - K8sGPT first impressionsKuberTENes Birthday Bash Guadalajara - K8sGPT first impressions
KuberTENes Birthday Bash Guadalajara - K8sGPT first impressions
Victor Morales
 
Open Discussion: Nephio Test-infra project
Open Discussion: Nephio Test-infra projectOpen Discussion: Nephio Test-infra project
Open Discussion: Nephio Test-infra project
Victor Morales
 
KCD Costa Rica 2024 - Nephio para parvulitos
KCD Costa Rica 2024 - Nephio para parvulitosKCD Costa Rica 2024 - Nephio para parvulitos
KCD Costa Rica 2024 - Nephio para parvulitos
Victor Morales
 
CCOSS + KCD Mexico 2024 - Embracing GitOps in Telecom with Nephio
CCOSS + KCD Mexico 2024 - Embracing GitOps in Telecom with NephioCCOSS + KCD Mexico 2024 - Embracing GitOps in Telecom with Nephio
CCOSS + KCD Mexico 2024 - Embracing GitOps in Telecom with Nephio
Victor Morales
 
Nephio 101
Nephio 101Nephio 101
Nephio 101
Victor Morales
 
Tips and tricks for contributing to an Open Source project.pptx
Tips and tricks for contributing to an Open Source project.pptxTips and tricks for contributing to an Open Source project.pptx
Tips and tricks for contributing to an Open Source project.pptx
Victor Morales
 
Understanding the Cloud-Native origins.pptx
Understanding the Cloud-Native origins.pptxUnderstanding the Cloud-Native origins.pptx
Understanding the Cloud-Native origins.pptx
Victor Morales
 
My OPNFV journey
My OPNFV journeyMy OPNFV journey
My OPNFV journey
Victor Morales
 
Deciphering Kubernetes Networking
Deciphering Kubernetes NetworkingDeciphering Kubernetes Networking
Deciphering Kubernetes Networking
Victor Morales
 
Removing Language Barriers for Spanish-speaking Professionals
Removing Language Barriers for Spanish-speaking ProfessionalsRemoving Language Barriers for Spanish-speaking Professionals
Removing Language Barriers for Spanish-speaking Professionals
Victor Morales
 
How to contribute to an open source project and don’t die during the Code Rev...
How to contribute to an open source project and don’t die during the Code Rev...How to contribute to an open source project and don’t die during the Code Rev...
How to contribute to an open source project and don’t die during the Code Rev...
Victor Morales
 
Mutating Admission Webhook creation
Mutating Admission Webhook creationMutating Admission Webhook creation
Mutating Admission Webhook creation
Victor Morales
 
GW Tester
GW TesterGW Tester
GW Tester
Victor Morales
 
Pod Sandbox workflow creation from Dockershim
Pod Sandbox workflow creation from DockershimPod Sandbox workflow creation from Dockershim
Pod Sandbox workflow creation from Dockershim
Victor Morales
 
Kubernetes fundamentals
Kubernetes fundamentalsKubernetes fundamentals
Kubernetes fundamentals
Victor Morales
 
Cloud native fundamentals
Cloud native fundamentalsCloud native fundamentals
Cloud native fundamentals
Victor Morales
 
Building cloud native network functions - outcomes from the gw-tester nsm imp...
Building cloud native network functions - outcomes from the gw-tester nsm imp...Building cloud native network functions - outcomes from the gw-tester nsm imp...
Building cloud native network functions - outcomes from the gw-tester nsm imp...
Victor Morales
 
Kubernetes Resources Allocation
Kubernetes Resources AllocationKubernetes Resources Allocation
Kubernetes Resources Allocation
Victor Morales
 
ONAP MultiCloud/K8s Casablanca
ONAP MultiCloud/K8s CasablancaONAP MultiCloud/K8s Casablanca
ONAP MultiCloud/K8s Casablanca
Victor Morales
 
Kubernetes based Cloud-region support in ONAP to bring up VM and container ba...
Kubernetes based Cloud-region support in ONAP to bring up VM and container ba...Kubernetes based Cloud-region support in ONAP to bring up VM and container ba...
Kubernetes based Cloud-region support in ONAP to bring up VM and container ba...
Victor Morales
 

More from Victor Morales (20)

KuberTENes Birthday Bash Guadalajara - K8sGPT first impressions
KuberTENes Birthday Bash Guadalajara - K8sGPT first impressionsKuberTENes Birthday Bash Guadalajara - K8sGPT first impressions
KuberTENes Birthday Bash Guadalajara - K8sGPT first impressions
 
Open Discussion: Nephio Test-infra project
Open Discussion: Nephio Test-infra projectOpen Discussion: Nephio Test-infra project
Open Discussion: Nephio Test-infra project
 
KCD Costa Rica 2024 - Nephio para parvulitos
KCD Costa Rica 2024 - Nephio para parvulitosKCD Costa Rica 2024 - Nephio para parvulitos
KCD Costa Rica 2024 - Nephio para parvulitos
 
CCOSS + KCD Mexico 2024 - Embracing GitOps in Telecom with Nephio
CCOSS + KCD Mexico 2024 - Embracing GitOps in Telecom with NephioCCOSS + KCD Mexico 2024 - Embracing GitOps in Telecom with Nephio
CCOSS + KCD Mexico 2024 - Embracing GitOps in Telecom with Nephio
 
Nephio 101
Nephio 101Nephio 101
Nephio 101
 
Tips and tricks for contributing to an Open Source project.pptx
Tips and tricks for contributing to an Open Source project.pptxTips and tricks for contributing to an Open Source project.pptx
Tips and tricks for contributing to an Open Source project.pptx
 
Understanding the Cloud-Native origins.pptx
Understanding the Cloud-Native origins.pptxUnderstanding the Cloud-Native origins.pptx
Understanding the Cloud-Native origins.pptx
 
My OPNFV journey
My OPNFV journeyMy OPNFV journey
My OPNFV journey
 
Deciphering Kubernetes Networking
Deciphering Kubernetes NetworkingDeciphering Kubernetes Networking
Deciphering Kubernetes Networking
 
Removing Language Barriers for Spanish-speaking Professionals
Removing Language Barriers for Spanish-speaking ProfessionalsRemoving Language Barriers for Spanish-speaking Professionals
Removing Language Barriers for Spanish-speaking Professionals
 
How to contribute to an open source project and don’t die during the Code Rev...
How to contribute to an open source project and don’t die during the Code Rev...How to contribute to an open source project and don’t die during the Code Rev...
How to contribute to an open source project and don’t die during the Code Rev...
 
Mutating Admission Webhook creation
Mutating Admission Webhook creationMutating Admission Webhook creation
Mutating Admission Webhook creation
 
GW Tester
GW TesterGW Tester
GW Tester
 
Pod Sandbox workflow creation from Dockershim
Pod Sandbox workflow creation from DockershimPod Sandbox workflow creation from Dockershim
Pod Sandbox workflow creation from Dockershim
 
Kubernetes fundamentals
Kubernetes fundamentalsKubernetes fundamentals
Kubernetes fundamentals
 
Cloud native fundamentals
Cloud native fundamentalsCloud native fundamentals
Cloud native fundamentals
 
Building cloud native network functions - outcomes from the gw-tester nsm imp...
Building cloud native network functions - outcomes from the gw-tester nsm imp...Building cloud native network functions - outcomes from the gw-tester nsm imp...
Building cloud native network functions - outcomes from the gw-tester nsm imp...
 
Kubernetes Resources Allocation
Kubernetes Resources AllocationKubernetes Resources Allocation
Kubernetes Resources Allocation
 
ONAP MultiCloud/K8s Casablanca
ONAP MultiCloud/K8s CasablancaONAP MultiCloud/K8s Casablanca
ONAP MultiCloud/K8s Casablanca
 
Kubernetes based Cloud-region support in ONAP to bring up VM and container ba...
Kubernetes based Cloud-region support in ONAP to bring up VM and container ba...Kubernetes based Cloud-region support in ONAP to bring up VM and container ba...
Kubernetes based Cloud-region support in ONAP to bring up VM and container ba...
 

Recently uploaded

Advances in Detect and Avoid for Unmanned Aircraft Systems and Advanced Air M...
Advances in Detect and Avoid for Unmanned Aircraft Systems and Advanced Air M...Advances in Detect and Avoid for Unmanned Aircraft Systems and Advanced Air M...
Advances in Detect and Avoid for Unmanned Aircraft Systems and Advanced Air M...
VICTOR MAESTRE RAMIREZ
 
Response & Safe AI at Summer School of AI at IIITH
Response & Safe AI at Summer School of AI at IIITHResponse & Safe AI at Summer School of AI at IIITH
Response & Safe AI at Summer School of AI at IIITH
IIIT Hyderabad
 
一比一原版(UQ毕业证书)昆士兰大学毕业证如何办理
一比一原版(UQ毕业证书)昆士兰大学毕业证如何办理一比一原版(UQ毕业证书)昆士兰大学毕业证如何办理
一比一原版(UQ毕业证书)昆士兰大学毕业证如何办理
byyi0h
 
PMSM-Motor-Control : A research about FOC
PMSM-Motor-Control : A research about FOCPMSM-Motor-Control : A research about FOC
PMSM-Motor-Control : A research about FOC
itssurajthakur06
 
CONVEGNO DA IRETI 18 giugno 2024 | PASQUALE Donato
CONVEGNO DA IRETI 18 giugno 2024 | PASQUALE DonatoCONVEGNO DA IRETI 18 giugno 2024 | PASQUALE Donato
CONVEGNO DA IRETI 18 giugno 2024 | PASQUALE Donato
Servizi a rete
 
system structure in operating systems.pdf
system structure in operating systems.pdfsystem structure in operating systems.pdf
system structure in operating systems.pdf
zyroxsunny
 
MSBTE K Scheme MSBTE K Scheme MSBTE K Scheme MSBTE K Scheme
MSBTE K Scheme MSBTE K Scheme MSBTE K Scheme MSBTE K SchemeMSBTE K Scheme MSBTE K Scheme MSBTE K Scheme MSBTE K Scheme
MSBTE K Scheme MSBTE K Scheme MSBTE K Scheme MSBTE K Scheme
Anwar Patel
 
Social media management system project report.pdf
Social media management system project report.pdfSocial media management system project report.pdf
Social media management system project report.pdf
Kamal Acharya
 
@Call @Girls Kochi 🚒 XXXXXXXXXX 🚒 Priya Sharma Beautiful And Cute Girl any Time
@Call @Girls Kochi 🚒 XXXXXXXXXX 🚒 Priya Sharma Beautiful And Cute Girl any Time@Call @Girls Kochi 🚒 XXXXXXXXXX 🚒 Priya Sharma Beautiful And Cute Girl any Time
@Call @Girls Kochi 🚒 XXXXXXXXXX 🚒 Priya Sharma Beautiful And Cute Girl any Time
Escorts service
 
L-3536-Cost Benifit Analysis in ESIA.pptx
L-3536-Cost Benifit Analysis in ESIA.pptxL-3536-Cost Benifit Analysis in ESIA.pptx
L-3536-Cost Benifit Analysis in ESIA.pptx
naseki5964
 
GUIA_LEGAL_CHAPTER-9_COLOMBIAN ELECTRICITY (1).pdf
GUIA_LEGAL_CHAPTER-9_COLOMBIAN ELECTRICITY (1).pdfGUIA_LEGAL_CHAPTER-9_COLOMBIAN ELECTRICITY (1).pdf
GUIA_LEGAL_CHAPTER-9_COLOMBIAN ELECTRICITY (1).pdf
ProexportColombia1
 
Germany Offshore Wind 010724 RE (1) 2 test.pptx
Germany Offshore Wind 010724 RE (1) 2 test.pptxGermany Offshore Wind 010724 RE (1) 2 test.pptx
Germany Offshore Wind 010724 RE (1) 2 test.pptx
rebecca841358
 
Introduction to IP address concept - Computer Networking
Introduction to IP address concept - Computer NetworkingIntroduction to IP address concept - Computer Networking
Introduction to IP address concept - Computer Networking
Md.Shohel Rana ( M.Sc in CSE Khulna University of Engineering & Technology (KUET))
 
Unblocking The Main Thread - Solving ANRs and Frozen Frames
Unblocking The Main Thread - Solving ANRs and Frozen FramesUnblocking The Main Thread - Solving ANRs and Frozen Frames
Unblocking The Main Thread - Solving ANRs and Frozen Frames
Sinan KOZAK
 
Lecture 3 Biomass energy...............ppt
Lecture 3 Biomass energy...............pptLecture 3 Biomass energy...............ppt
Lecture 3 Biomass energy...............ppt
RujanTimsina1
 
Trends in Computer Aided Design and MFG.
Trends in Computer Aided Design and MFG.Trends in Computer Aided Design and MFG.
Trends in Computer Aided Design and MFG.
Tool and Die Tech
 
GUIA_LEGAL_CHAPTER_4_FOREIGN TRADE CUSTOMS.pdf
GUIA_LEGAL_CHAPTER_4_FOREIGN TRADE CUSTOMS.pdfGUIA_LEGAL_CHAPTER_4_FOREIGN TRADE CUSTOMS.pdf
GUIA_LEGAL_CHAPTER_4_FOREIGN TRADE CUSTOMS.pdf
ProexportColombia1
 
Bangalore @ℂall @Girls ꧁❤ 0000000000 ❤꧂@ℂall @Girls Service Vip Top Model Safe
Bangalore @ℂall @Girls ꧁❤ 0000000000 ❤꧂@ℂall @Girls Service Vip Top Model SafeBangalore @ℂall @Girls ꧁❤ 0000000000 ❤꧂@ℂall @Girls Service Vip Top Model Safe
Bangalore @ℂall @Girls ꧁❤ 0000000000 ❤꧂@ℂall @Girls Service Vip Top Model Safe
bookhotbebes1
 
kiln burning and kiln burner system for clinker
kiln burning and kiln burner system for clinkerkiln burning and kiln burner system for clinker
kiln burning and kiln burner system for clinker
hamedmustafa094
 
21CV61- Module 3 (CONSTRUCTION MANAGEMENT AND ENTREPRENEURSHIP.pptx
21CV61- Module 3 (CONSTRUCTION MANAGEMENT AND ENTREPRENEURSHIP.pptx21CV61- Module 3 (CONSTRUCTION MANAGEMENT AND ENTREPRENEURSHIP.pptx
21CV61- Module 3 (CONSTRUCTION MANAGEMENT AND ENTREPRENEURSHIP.pptx
sanabts249
 

Recently uploaded (20)

Advances in Detect and Avoid for Unmanned Aircraft Systems and Advanced Air M...
Advances in Detect and Avoid for Unmanned Aircraft Systems and Advanced Air M...Advances in Detect and Avoid for Unmanned Aircraft Systems and Advanced Air M...
Advances in Detect and Avoid for Unmanned Aircraft Systems and Advanced Air M...
 
Response & Safe AI at Summer School of AI at IIITH
Response & Safe AI at Summer School of AI at IIITHResponse & Safe AI at Summer School of AI at IIITH
Response & Safe AI at Summer School of AI at IIITH
 
一比一原版(UQ毕业证书)昆士兰大学毕业证如何办理
一比一原版(UQ毕业证书)昆士兰大学毕业证如何办理一比一原版(UQ毕业证书)昆士兰大学毕业证如何办理
一比一原版(UQ毕业证书)昆士兰大学毕业证如何办理
 
PMSM-Motor-Control : A research about FOC
PMSM-Motor-Control : A research about FOCPMSM-Motor-Control : A research about FOC
PMSM-Motor-Control : A research about FOC
 
CONVEGNO DA IRETI 18 giugno 2024 | PASQUALE Donato
CONVEGNO DA IRETI 18 giugno 2024 | PASQUALE DonatoCONVEGNO DA IRETI 18 giugno 2024 | PASQUALE Donato
CONVEGNO DA IRETI 18 giugno 2024 | PASQUALE Donato
 
system structure in operating systems.pdf
system structure in operating systems.pdfsystem structure in operating systems.pdf
system structure in operating systems.pdf
 
MSBTE K Scheme MSBTE K Scheme MSBTE K Scheme MSBTE K Scheme
MSBTE K Scheme MSBTE K Scheme MSBTE K Scheme MSBTE K SchemeMSBTE K Scheme MSBTE K Scheme MSBTE K Scheme MSBTE K Scheme
MSBTE K Scheme MSBTE K Scheme MSBTE K Scheme MSBTE K Scheme
 
Social media management system project report.pdf
Social media management system project report.pdfSocial media management system project report.pdf
Social media management system project report.pdf
 
@Call @Girls Kochi 🚒 XXXXXXXXXX 🚒 Priya Sharma Beautiful And Cute Girl any Time
@Call @Girls Kochi 🚒 XXXXXXXXXX 🚒 Priya Sharma Beautiful And Cute Girl any Time@Call @Girls Kochi 🚒 XXXXXXXXXX 🚒 Priya Sharma Beautiful And Cute Girl any Time
@Call @Girls Kochi 🚒 XXXXXXXXXX 🚒 Priya Sharma Beautiful And Cute Girl any Time
 
L-3536-Cost Benifit Analysis in ESIA.pptx
L-3536-Cost Benifit Analysis in ESIA.pptxL-3536-Cost Benifit Analysis in ESIA.pptx
L-3536-Cost Benifit Analysis in ESIA.pptx
 
GUIA_LEGAL_CHAPTER-9_COLOMBIAN ELECTRICITY (1).pdf
GUIA_LEGAL_CHAPTER-9_COLOMBIAN ELECTRICITY (1).pdfGUIA_LEGAL_CHAPTER-9_COLOMBIAN ELECTRICITY (1).pdf
GUIA_LEGAL_CHAPTER-9_COLOMBIAN ELECTRICITY (1).pdf
 
Germany Offshore Wind 010724 RE (1) 2 test.pptx
Germany Offshore Wind 010724 RE (1) 2 test.pptxGermany Offshore Wind 010724 RE (1) 2 test.pptx
Germany Offshore Wind 010724 RE (1) 2 test.pptx
 
Introduction to IP address concept - Computer Networking
Introduction to IP address concept - Computer NetworkingIntroduction to IP address concept - Computer Networking
Introduction to IP address concept - Computer Networking
 
Unblocking The Main Thread - Solving ANRs and Frozen Frames
Unblocking The Main Thread - Solving ANRs and Frozen FramesUnblocking The Main Thread - Solving ANRs and Frozen Frames
Unblocking The Main Thread - Solving ANRs and Frozen Frames
 
Lecture 3 Biomass energy...............ppt
Lecture 3 Biomass energy...............pptLecture 3 Biomass energy...............ppt
Lecture 3 Biomass energy...............ppt
 
Trends in Computer Aided Design and MFG.
Trends in Computer Aided Design and MFG.Trends in Computer Aided Design and MFG.
Trends in Computer Aided Design and MFG.
 
GUIA_LEGAL_CHAPTER_4_FOREIGN TRADE CUSTOMS.pdf
GUIA_LEGAL_CHAPTER_4_FOREIGN TRADE CUSTOMS.pdfGUIA_LEGAL_CHAPTER_4_FOREIGN TRADE CUSTOMS.pdf
GUIA_LEGAL_CHAPTER_4_FOREIGN TRADE CUSTOMS.pdf
 
Bangalore @ℂall @Girls ꧁❤ 0000000000 ❤꧂@ℂall @Girls Service Vip Top Model Safe
Bangalore @ℂall @Girls ꧁❤ 0000000000 ❤꧂@ℂall @Girls Service Vip Top Model SafeBangalore @ℂall @Girls ꧁❤ 0000000000 ❤꧂@ℂall @Girls Service Vip Top Model Safe
Bangalore @ℂall @Girls ꧁❤ 0000000000 ❤꧂@ℂall @Girls Service Vip Top Model Safe
 
kiln burning and kiln burner system for clinker
kiln burning and kiln burner system for clinkerkiln burning and kiln burner system for clinker
kiln burning and kiln burner system for clinker
 
21CV61- Module 3 (CONSTRUCTION MANAGEMENT AND ENTREPRENEURSHIP.pptx
21CV61- Module 3 (CONSTRUCTION MANAGEMENT AND ENTREPRENEURSHIP.pptx21CV61- Module 3 (CONSTRUCTION MANAGEMENT AND ENTREPRENEURSHIP.pptx
21CV61- Module 3 (CONSTRUCTION MANAGEMENT AND ENTREPRENEURSHIP.pptx
 

Deep dive networking

  • 1. Deep dive K8s Networking Victor Morales
  • 2. Victor Morales • +15 yrs as a Software Engineer • .NET, Java, python, Go programmer • OpenStack, OPNFV, ONAP and CNCF contributor. https://about.me/electrocucaracha
  • 3. Multicore Crisis Named by Bob “SmoothSpan” Warfield in 2007, the situation in which the effects of Moore’s Law have changed: while the doubling of transistors per chip continues, the by-product is no longer faster processor speeds but more cores per chips instead. https://smoothspan.com/2007/09/06/a-picture-of-the-multicore-crisis/
  • 5. Fallacies of distributed computing 1. The network is reliable 2. Latency is zero 3. Bandwidth is infinite 4. The network is secure 5. Topology doesn't change 6. There is one administrator 7. Transport cost is zero 8. The network is homogeneous https://blogs.oracle.com/developers/fallacies-of-distributed-systems
  • 7. The Kubernetes network model • pods on a node can communicate with all pods on all nodes without NAT • agents on a node (e.g. system daemons, kubelet) can communicate with all pods on that node • pods in the host network of a node can communicate with all pods on all nodes without NAT https://kubernetes.io/docs/concepts/cluster- administration/networking/#the-kubernetes- network-model https://mrscriptkiddie.com/ what-is-network-address- translationnat-working- explained/
  • 9. Flannel CNI (controller) $ kubectl logs $(kubectl get pods -A -o wide | grep "flannel.*controller" | awk '{ print $2}') -n kube-system I0503 23:08:17.135980 1 main.go:518] Determining IP address of default interface I0503 23:08:17.136722 1 main.go:531] Using interface with name eth0 and address 10.0.2.56 I0503 23:08:17.136731 1 main.go:548] Defaulting external address to interface address (10.0.2.56) W0503 23:08:17.136748 1 client_config.go:517] Neither --kubeconfig nor --master was specified. Using the inClusterConfig. This might not work. I0503 23:08:17.143884 1 kube.go:119] Waiting 10m0s for node controller to sync I0503 23:08:17.143910 1 kube.go:306] Starting kube subnet manager I0503 23:08:18.144214 1 kube.go:126] Node controller sync successful I0503 23:08:18.144280 1 main.go:246] Created subnet manager: Kubernetes Subnet Manager - controller I0503 23:08:18.144295 1 main.go:249] Installing signal handlers I0503 23:08:18.144431 1 main.go:390] Found network config - Backend type: host-gw I0503 23:08:18.195402 1 main.go:355] Current network or subnet (10.233.64.0/18, 10.233.64.0/24) is not equal to previous one (0.0.0.0/0, 0.0.0.0/0), trying to recycle old iptables rules I0503 23:08:18.225336 1 iptables.go:167] Deleting iptables rule: -s 0.0.0.0/0 -d 0.0.0.0/0 -j RETURN I0503 23:08:18.228056 1 iptables.go:167] Deleting iptables rule: -s 0.0.0.0/0 ! -d 224.0.0.0/4 -j MASQUERADE --random-fully I0503 23:08:18.229526 1 iptables.go:167] Deleting iptables rule: ! -s 0.0.0.0/0 -d 0.0.0.0/0 -j RETURN I0503 23:08:18.230803 1 iptables.go:167] Deleting iptables rule: ! -s 0.0.0.0/0 -d 0.0.0.0/0 -j MASQUERADE --random-fully I0503 23:08:18.232086 1 main.go:305] Setting up masking rules I0503 23:08:18.232959 1 main.go:313] Changing default FORWARD chain policy to ACCEPT I0503 23:08:18.233059 1 main.go:321] Wrote subnet file to /run/flannel/subnet.env I0503 23:08:18.233069 1 main.go:325] Running backend. I0503 23:08:18.233082 1 main.go:343] Waiting for all goroutines to exit I0503 23:08:18.233114 1 route_network.go:53] Watching for new subnet leases I0503 23:08:18.234944 1 iptables.go:145] Some iptables rules are missing; deleting and recreating rules I0503 23:08:18.234958 1 iptables.go:167] Deleting iptables rule: -s 10.233.64.0/18 -d 10.233.64.0/18 -j RETURN I0503 23:08:18.235938 1 iptables.go:167] Deleting iptables rule: -s 10.233.64.0/18 ! -d 224.0.0.0/4 -j MASQUERADE --random-fully I0503 23:08:18.237037 1 iptables.go:167] Deleting iptables rule: ! -s 10.233.64.0/18 -d 10.233.64.0/24 -j RETURN I0503 23:08:18.238218 1 iptables.go:167] Deleting iptables rule: ! -s 10.233.64.0/18 -d 10.233.64.0/18 -j MASQUERADE --random-fully I0503 23:08:18.239041 1 iptables.go:155] Adding iptables rule: -s 10.233.64.0/18 -d 10.233.64.0/18 -j RETURN I0503 23:08:18.240543 1 iptables.go:155] Adding iptables rule: -s 10.233.64.0/18 ! -d 224.0.0.0/4 -j MASQUERADE --random-fully I0503 23:08:18.242157 1 iptables.go:155] Adding iptables rule: ! -s 10.233.64.0/18 -d 10.233.64.0/24 -j RETURN I0503 23:08:18.243441 1 iptables.go:155] Adding iptables rule: ! -s 10.233.64.0/18 -d 10.233.64.0/18 -j MASQUERADE --random-fully I0503 23:08:18.245337 1 iptables.go:145] Some iptables rules are missing; deleting and recreating rules I0503 23:08:18.245348 1 iptables.go:167] Deleting iptables rule: -s 10.233.64.0/18 -j ACCEPT I0503 23:08:18.245946 1 iptables.go:167] Deleting iptables rule: -d 10.233.64.0/18 -j ACCEPT I0503 23:08:18.246539 1 iptables.go:155] Adding iptables rule: -s 10.233.64.0/18 -j ACCEPT I0503 23:08:18.249302 1 iptables.go:155] Adding iptables rule: -d 10.233.64.0/18 -j ACCEPT I0503 23:08:20.442619 1 route_network.go:85] Subnet added: 10.233.65.0/24 via 10.0.2.14 I0503 23:08:20.466725 1 route_network.go:85] Subnet added: 10.233.66.0/24 via 10.0.2.254 controller eth0 10.0.2.56/24 Flannel Overlay network: 10.233.64.0/18 Pod’s Subnet: 10.233.64.0/24
  • 10. Flannel CNI (worker01) $ kubectl logs $(kubectl get pods -A -o wide | grep "flannel.*worker01" | awk '{ print $2}') -n kube-system I0503 23:08:19.426175 1 main.go:518] Determining IP address of default interface I0503 23:08:19.426440 1 main.go:531] Using interface with name eth0 and address 10.0.2.254 I0503 23:08:19.426455 1 main.go:548] Defaulting external address to interface address (10.0.2.254) W0503 23:08:19.426470 1 client_config.go:517] Neither --kubeconfig nor --master was specified. Using the inClusterConfig. This might not work. I0503 23:08:19.433617 1 kube.go:119] Waiting 10m0s for node controller to sync I0503 23:08:19.433948 1 kube.go:306] Starting kube subnet manager I0503 23:08:20.433999 1 kube.go:126] Node controller sync successful I0503 23:08:20.434025 1 main.go:246] Created subnet manager: Kubernetes Subnet Manager - worker01 I0503 23:08:20.434030 1 main.go:249] Installing signal handlers I0503 23:08:20.434090 1 main.go:390] Found network config - Backend type: host-gw I0503 23:08:20.448682 1 main.go:355] Current network or subnet (10.233.64.0/18, 10.233.66.0/24) is not equal to previous one (0.0.0.0/0, 0.0.0.0/0), trying to recycle old iptables rules I0503 23:08:20.484395 1 iptables.go:167] Deleting iptables rule: -s 0.0.0.0/0 -d 0.0.0.0/0 -j RETURN I0503 23:08:20.485015 1 iptables.go:167] Deleting iptables rule: -s 0.0.0.0/0 ! -d 224.0.0.0/4 -j MASQUERADE --random-fully I0503 23:08:20.485531 1 iptables.go:167] Deleting iptables rule: ! -s 0.0.0.0/0 -d 0.0.0.0/0 -j RETURN I0503 23:08:20.486022 1 iptables.go:167] Deleting iptables rule: ! -s 0.0.0.0/0 -d 0.0.0.0/0 -j MASQUERADE --random-fully I0503 23:08:20.486554 1 main.go:305] Setting up masking rules I0503 23:08:20.486985 1 main.go:313] Changing default FORWARD chain policy to ACCEPT I0503 23:08:20.487040 1 main.go:321] Wrote subnet file to /run/flannel/subnet.env I0503 23:08:20.487045 1 main.go:325] Running backend. I0503 23:08:20.487052 1 main.go:343] Waiting for all goroutines to exit I0503 23:08:20.487064 1 route_network.go:53] Watching for new subnet leases I0503 23:08:20.487236 1 route_network.go:85] Subnet added: 10.233.64.0/24 via 10.0.2.56 I0503 23:08:20.487378 1 route_network.go:85] Subnet added: 10.233.65.0/24 via 10.0.2.14 I0503 23:08:20.488369 1 iptables.go:145] Some iptables rules are missing; deleting and recreating rules I0503 23:08:20.488376 1 iptables.go:167] Deleting iptables rule: -s 10.233.64.0/18 -d 10.233.64.0/18 -j RETURN I0503 23:08:20.496685 1 iptables.go:145] Some iptables rules are missing; deleting and recreating rules I0503 23:08:20.496696 1 iptables.go:167] Deleting iptables rule: -s 10.233.64.0/18 -j ACCEPT I0503 23:08:20.496766 1 iptables.go:167] Deleting iptables rule: -s 10.233.64.0/18 ! -d 224.0.0.0/4 -j MASQUERADE --random-fully I0503 23:08:20.497367 1 iptables.go:167] Deleting iptables rule: -d 10.233.64.0/18 -j ACCEPT I0503 23:08:20.497888 1 iptables.go:155] Adding iptables rule: -s 10.233.64.0/18 -j ACCEPT I0503 23:08:20.498893 1 iptables.go:167] Deleting iptables rule: ! -s 10.233.64.0/18 -d 10.233.66.0/24 -j RETURN I0503 23:08:20.499455 1 iptables.go:167] Deleting iptables rule: ! -s 10.233.64.0/18 -d 10.233.64.0/18 -j MASQUERADE --random-fully I0503 23:08:20.500091 1 iptables.go:155] Adding iptables rule: -s 10.233.64.0/18 -d 10.233.64.0/18 -j RETURN I0503 23:08:20.501584 1 iptables.go:155] Adding iptables rule: -d 10.233.64.0/18 -j ACCEPT I0503 23:08:20.502204 1 iptables.go:155] Adding iptables rule: -s 10.233.64.0/18 ! -d 224.0.0.0/4 -j MASQUERADE --random-fully I0503 23:08:20.508007 1 iptables.go:155] Adding iptables rule: ! -s 10.233.64.0/18 -d 10.233.66.0/24 -j RETURN I0503 23:08:20.509166 1 iptables.go:155] Adding iptables rule: ! -s 10.233.64.0/18 -d 10.233.64.0/18 -j MASQUERADE --random-fully worker01 eth0 10.0.2.254/24 Flannel Overlay network: 10.233.64.0/18 Pod’s Subnet: 10.233.66.0/24
  • 11. Flannel CNI (worker02) $ kubectl logs $(kubectl get pods -A -o wide | grep "flannel.*worker02" | awk '{ print $2}') -n kube-system I0503 23:08:19.395547 1 main.go:518] Determining IP address of default interface I0503 23:08:19.395834 1 main.go:531] Using interface with name eth0 and address 10.0.2.14 I0503 23:08:19.395849 1 main.go:548] Defaulting external address to interface address (10.0.2.14) W0503 23:08:19.395859 1 client_config.go:517] Neither --kubeconfig nor --master was specified. Using the inClusterConfig. This might not work. I0503 23:08:19.403033 1 kube.go:119] Waiting 10m0s for node controller to sync I0503 23:08:19.403392 1 kube.go:306] Starting kube subnet manager I0503 23:08:20.403454 1 kube.go:126] Node controller sync successful I0503 23:08:20.403478 1 main.go:246] Created subnet manager: Kubernetes Subnet Manager - worker02 I0503 23:08:20.403482 1 main.go:249] Installing signal handlers I0503 23:08:20.403525 1 main.go:390] Found network config - Backend type: host-gw I0503 23:08:20.424202 1 main.go:355] Current network or subnet (10.233.64.0/18, 10.233.65.0/24) is not equal to previous one (0.0.0.0/0, 0.0.0.0/0), trying to recycle old iptables rules I0503 23:08:20.439644 1 iptables.go:167] Deleting iptables rule: -s 0.0.0.0/0 -d 0.0.0.0/0 -j RETURN I0503 23:08:20.440832 1 iptables.go:167] Deleting iptables rule: -s 0.0.0.0/0 ! -d 224.0.0.0/4 -j MASQUERADE --random-fully I0503 23:08:20.441848 1 iptables.go:167] Deleting iptables rule: ! -s 0.0.0.0/0 -d 0.0.0.0/0 -j RETURN I0503 23:08:20.442882 1 iptables.go:167] Deleting iptables rule: ! -s 0.0.0.0/0 -d 0.0.0.0/0 -j MASQUERADE --random-fully I0503 23:08:20.443786 1 main.go:305] Setting up masking rules I0503 23:08:20.444598 1 main.go:313] Changing default FORWARD chain policy to ACCEPT I0503 23:08:20.444686 1 main.go:321] Wrote subnet file to /run/flannel/subnet.env I0503 23:08:20.444695 1 main.go:325] Running backend. I0503 23:08:20.444706 1 main.go:343] Waiting for all goroutines to exit I0503 23:08:20.444729 1 route_network.go:53] Watching for new subnet leases I0503 23:08:20.444979 1 route_network.go:85] Subnet added: 10.233.64.0/24 via 10.0.2.56 I0503 23:08:20.445165 1 route_network.go:85] Subnet added: 10.233.66.0/24 via 10.0.2.254 I0503 23:08:20.446388 1 iptables.go:145] Some iptables rules are missing; deleting and recreating rules I0503 23:08:20.446397 1 iptables.go:167] Deleting iptables rule: -s 10.233.64.0/18 -d 10.233.64.0/18 -j RETURN I0503 23:08:20.446864 1 iptables.go:145] Some iptables rules are missing; deleting and recreating rules I0503 23:08:20.446872 1 iptables.go:167] Deleting iptables rule: -s 10.233.64.0/18 -j ACCEPT I0503 23:08:20.447285 1 iptables.go:167] Deleting iptables rule: -s 10.233.64.0/18 ! -d 224.0.0.0/4 -j MASQUERADE --random-fully I0503 23:08:20.447701 1 iptables.go:167] Deleting iptables rule: -d 10.233.64.0/18 -j ACCEPT I0503 23:08:20.448317 1 iptables.go:167] Deleting iptables rule: ! -s 10.233.64.0/18 -d 10.233.65.0/24 -j RETURN I0503 23:08:20.448802 1 iptables.go:155] Adding iptables rule: -s 10.233.64.0/18 -j ACCEPT I0503 23:08:20.449289 1 iptables.go:167] Deleting iptables rule: ! -s 10.233.64.0/18 -d 10.233.64.0/18 -j MASQUERADE --random-fully I0503 23:08:20.450172 1 iptables.go:155] Adding iptables rule: -s 10.233.64.0/18 -d 10.233.64.0/18 -j RETURN I0503 23:08:20.450643 1 iptables.go:155] Adding iptables rule: -d 10.233.64.0/18 -j ACCEPT I0503 23:08:20.477083 1 iptables.go:155] Adding iptables rule: -s 10.233.64.0/18 ! -d 224.0.0.0/4 -j MASQUERADE --random-fully I0503 23:08:20.478562 1 iptables.go:155] Adding iptables rule: ! -s 10.233.64.0/18 -d 10.233.65.0/24 -j RETURN I0503 23:08:20.480024 1 iptables.go:155] Adding iptables rule: ! -s 10.233.64.0/18 -d 10.233.64.0/18 -j MASQUERADE --random-fully worker02 eth0 10.0.2.14/24 Flannel Overlay network: 10.233.64.0/18 Pod’s Subnet: 10.233.65.0/24
  • 13. Demo 1 worker01 eth0 pod1 10.233.66.4/24 eth0 client pod2 eth0 server 10.233.66.5/24 $ kubectl get pods -o custom-columns="NAME:metadata.name,IP:status.podIP,NODE:spec.nodeName" NAME IP NODE pod1 10.233.66.4 worker01 pod2 10.233.66.5 worker01
  • 14. ssh worker01 (PIDs/net ns) worker01 eth0 pod1 10.233.66.4/24 eth0 client pause pod2 10.233.66.5/24 server pause $ for name in $(sudo docker ps --filter "name=pod*" --format "{{.Names}}"); do > echo "NAME:$name $(sudo docker inspect $name --format 'PID:{{.State.Pid}} CMD:{{.Path}}')" > done NAME:k8s_server_pod2_default_7e0da6ce-2693-448a-9def-55e25a53a9f8_0 PID:23231 CMD:sleep NAME:k8s_client_pod1_default_7f3063da-2e86-466e-812b-b45b8791af60_0 PID:23173 CMD:sleep NAME:k8s_POD_pod2_default_7e0da6ce-2693-448a-9def-55e25a53a9f8_0 PID:22936 CMD:/pause NAME:k8s_POD_pod1_default_7f3063da-2e86-466e-812b-b45b8791af60_0 PID:22902 CMD:/pause $ sudo lsns --type net NS TYPE NPROCS PID USER COMMAND 4026531993 net 139 1 root /sbin/init 4026532219 net 1 892 root /usr/sbin/haveged --Foreground --verbose=1 -w 1024 4026532321 net 2 17306 root /pause 4026532401 net 2 17675 root /pause 4026532481 net 2 22902 root /pause 4026532549 net 2 22936 root /pause 10.0.2.254/24 eth0 worker01 4026532481 10.233.66.4/24 eth0 23173 22902 4026532549 10.233.66.5/24 23231 22936 eth0 4026531993 eth0 10.0.2.254/24
  • 15. ssh worker01 (veths) $ sudo nsenter -t 23173 -n ip a s eth0 3: eth0@if10: <BROADCAST,MULTICAST,UP,LOWER_UP,M-DOWN> mtu 1500 qdisc noqueue link/ether 22:3d:13:16:4d:91 brd ff:ff:ff:ff:ff:ff inet 10.233.65.5/24 brd 10.233.66.255 scope global eth0 valid_lft forever preferred_lft forever $ sudo nsenter -t 23231 -n ip a s eth0 3: eth0@if11: <BROADCAST,MULTICAST,UP,LOWER_UP,M-DOWN> mtu 1500 qdisc noqueue link/ether 4e:45:9e:07:aa:73 brd ff:ff:ff:ff:ff:ff inet 10.233.65.6/24 brd 10.233.66.255 scope global eth0 valid_lft forever preferred_lft forever $ ip add show vethd2ff1e8f 10: vethd2ff1e8f@if3: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue master cni0 state UP group default link/ether de:71:37:62:8c:81 brd ff:ff:ff:ff:ff:ff link-netnsid 2 $ ip add show vethedf4daba 11: vethedf4daba@if3: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue master cni0 state UP group default link/ether 6e:38:5d:c3:1c:fe brd ff:ff:ff:ff:ff:ff link-netnsid 3 worker01 4026532481 10.233.66.4/24 eth0@if10 23173 22902 4026532549 10.233.66.5/24 23231 22936 4026531993 eth0 10.0.2.254/24 eth0@if11 vethd2ff1e8f vethedf4daba de:71:37:62:8c:81 6e:38:5d:c3:1c:fe
  • 16. ssh worker01 (bridge) worker01 4026532481 10.233.66.4/24 eth0@if10 23173 22902 4026532549 10.233.66.5/24 23231 22936 4026531993 eth0 10.0.2.254/24 eth0@if11 vethd2ff1e8f vethedf4daba cni0 $ ip addr show cni0 7: cni0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000 link/ether 2e:c5:8a:c4:ad:59 brd ff:ff:ff:ff:ff:ff inet 10.233.66.1/24 brd 10.233.66.255 scope global cni0 valid_lft forever preferred_lft forever $ brctl show cni0 bridge name bridge id STP enabled interfaces cni0 8000.1af5b56bb7bd no veth08082f56 vethd2ff1e8f vethe6c8889e vethedf4daba $ brctl showmacs cni0 port no mac addr is local? ageing timer 1 12:ec:de:82:22:e9 yes 0.00 1 12:ec:de:82:22:e9 yes 0.00 2 42:ed:db:49:ce:24 yes 0.00 2 42:ed:db:49:ce:24 yes 0.00 4 6e:38:5d:c3:1c:fe yes 0.00 4 6e:38:5d:c3:1c:fe yes 0.00 2 9e:93:b1:9b:10:1f no 1.16 3 de:71:37:62:8c:81 yes 0.00 3 de:71:37:62:8c:81 yes 0.00 1 ea:56:ef:33:2a:9a no 4.16 de:71:37:62:8c:81 6e:38:5d:c3:1c:fe 10.233.66.1/24
  • 17. ssh worker01 (routes) worker01 4026532481 10.233.66.4/24 eth0@if10 23173 22902 4026532549 10.233.66.5/24 23231 22936 4026531993 eth0 10.0.2.254/24 eth0@if11 vethd2ff1e8f vethedf4daba cni0 $ sudo nsenter -t 23173 -n ping -c 1 10.233.66.5 PING 10.233.66.5 (10.233.66.5) 56(84) bytes of data. 64 bytes from 10.233.66.5: icmp_seq=1 ttl=64 time=0.154 ms --- 10.233.66.5 ping statistics --- 1 packets transmitted, 1 received, 0% packet loss, time 0ms rtt min/avg/max/mdev = 0.154/0.154/0.154/0.000 ms $ sudo nsenter -t 23173 -n ip route default via 10.233.66.1 dev eth0 10.233.64.0/18 via 10.233.66.1 dev eth0 10.233.66.0/24 dev eth0 proto kernel scope link src 10.233.66.4 $ ip route default via 10.0.2.1 dev eth0 proto dhcp src 10.0.2.254 metric 100 10.0.2.0/24 dev eth0 proto kernel scope link src 10.0.2.254 10.0.2.1 dev eth0 proto dhcp scope link src 10.0.2.254 metric 100 10.10.16.0/24 dev eth1 proto kernel scope link src 10.10.16.4 10.233.64.0/24 via 10.0.2.56 dev eth0 10.233.65.0/24 via 10.0.2.14 dev eth0 10.233.66.0/24 dev cni0 proto kernel scope link src 10.233.66.1 172.17.0.0/16 dev docker0 proto kernel scope link src 172.17.0.1 linkdown 10.233.66.1/24
  • 19. Demo 2 worker01 eth0 pod1 10.233.66.6/24 eth0 client $ kubectl get pods -o custom-columns="NAME:metadata.name,IP:status.podIP,NODE:spec.nodeName" NAME IP NODE pod1 10.233.66.6 worker01 pod2 10.233.65.5 worker02 worker02 eth0 pod2 10.233.65.5/24 eth0 server
  • 20. ssh worker01 (routes) worker01 4026532481 10.233.66.6/24 eth0@if12 24330 24200 4026531993 eth0 10.0.2.254/24 veth24e469fc cni0 $ sudo nsenter -t 24330 -n traceroute 10.233.65.5 traceroute to 10.233.65.5 (10.233.65.5), 30 hops max, 60 byte packets 1 10.233.66.1 (10.233.66.1) 2.161 ms 1.855 ms 1.775 ms 2 10.0.2.14 (10.0.2.14) 1.719 ms 1.603 ms 1.515 ms 3 10.233.65.5 (10.233.65.5) 1.447 ms 1.336 ms 3.424 ms $ sudo nsenter -t 23173 -n ip route default via 10.233.66.1 dev eth0 10.233.64.0/18 via 10.233.66.1 dev eth0 10.233.66.0/24 dev eth0 proto kernel scope link src 10.233.66.4 $ ip route default via 10.0.2.1 dev eth0 proto dhcp src 10.0.2.254 metric 100 10.0.2.0/24 dev eth0 proto kernel scope link src 10.0.2.254 10.0.2.1 dev eth0 proto dhcp scope link src 10.0.2.254 metric 100 10.10.16.0/24 dev eth1 proto kernel scope link src 10.10.16.4 10.233.64.0/24 via 10.0.2.56 dev eth0 10.233.65.0/24 via 10.0.2.14 dev eth0 10.233.66.0/24 dev cni0 proto kernel scope link src 10.233.66.1 172.17.0.0/16 dev docker0 proto kernel scope link src 172.17.0.1 linkdown administration 10.0.2.0/24 worker02 4026532554 10.233.65.5/24 eth0@if11 22403 22281 4026531993 eth0 10.0.2.14/24 vethf6de8b6e cni0 10.233.66.1/24 10.233.65.1/24
  • 22. worker01 4026532481 10.233.66.6/24 eth0@if12 24330 24200 4026531993 eth0 10.0.2.254/24 veth24e469fc cni0 administration 10.0.2.0/24 worker02 4026532554 10.233.65.5/24 eth0@if11 22403 22281 4026531993 eth0 10.0.2.14/24 vethf6de8b6e cni0 Host Gateway worker01 4026532481 10.233.66.6/24 eth0@if12 24330 24200 4026531993 eth0 10.0.2.254/24 veth24e469fc cni0 administration 10.0.2.0/24 worker02 4026532554 10.233.65.5/24 eth0@if11 22403 22281 4026531993 eth0 10.0.2.14/24 vethf6de8b6e cni0 VXLAN flannel.1 flannel.1 VXLAN tunneling
  • 23. ssh worker01(routes) $ ip route default via 10.0.2.1 dev eth0 proto dhcp src 10.0.2.254 metric 100 10.0.2.0/24 dev eth0 proto kernel scope link src 10.0.2.254 10.0.2.1 dev eth0 proto dhcp scope link src 10.0.2.254 metric 100 10.10.16.0/24 dev eth1 proto kernel scope link src 10.10.16.4 10.233.64.0/24 via 10.233.64.0 dev flannel.1 onlink 10.233.65.0/24 via 10.233.65.0 dev flannel.1 onlink 10.233.66.0/24 dev cni0 proto kernel scope link src 10.233.66.1 172.17.0.0/16 dev docker0 proto kernel scope link src 172.17.0.1 linkdown $ ip neigh show dev flannel.1 10.233.64.0 lladdr fe:f7:38:5b:0a:4d PERMANENT 10.233.65.0 lladdr a2:c1:bf:3d:c9:7b PERMANENT $ bridge fdb show dev flannel.1 fe:f7:38:5b:0a:4d dst 10.0.2.56 self permanent a2:c1:bf:3d:c9:7b dst 10.0.2.14 self permanent $ ip -d link show flannel.1 5: flannel.1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1450 qdisc noqueue state UNKNOWN mode DEFAULT group default link/ether f6:22:6b:4b:11:48 brd ff:ff:ff:ff:ff:ff promiscuity 0 vxlan id 1 local 10.0.2.207 dev eth0 srcport 0 0 dstport 8472 nolearning ttl inherit ageing 300 udpcsum noudp6zerocsumtx noudp6zerocsumrx addrgenmode eui64 numtxqueues 1 numrxqueues 1 gso_max_size 65536 gso_max_segs 65535
  • 24. Virtual eXtensible Local Area Networking (VXLAN) The VXLAN protocol is a tunnelling protocol designed to solve the problem of limited VLAN IDs (4096) in IEEE 802.1q. With VXLAN the size of the identifier is expanded to 24 bits (16777216). https://www.kernel.org/doc/html/latest/networking/vxlan.html https://www.beyondcli.com/101/vxlan-vsphere-vcns-vs-nsx-for-vsphere/
  • 25. iperf results Host Gateway VXLAN Host Gateway offers 5x higher throughput than VXLAN backend.
  • 26. Slow Responses https://pragprog.com/titles/mnee2/release-it-second-edition/ Let threads block for minutes before throwing exceptions. The blocked thread can’t process other transactions, so overall capacity is reduced. • Slow responses trigger Cascading Failures • For websites, slow responses cause more traffic • Consider Fail Fast • Hunt for memory leaks or resource contention

Editor's Notes

  1. https://superuser.openstack.org/articles/run-your-kubernetes-cluster-on-openstack-in-production/