본문 바로가기
IT 기술/k8s

[cka] Networking Weave

by Geunny 2024. 8. 9.
반응형

1. How many Nodes are part of this cluster? Including master and worker nodes

controlplane ~ ➜  k get nodes
NAME           STATUS   ROLES           AGE   VERSION
controlplane   Ready    control-plane   59m   v1.30.0
node01         Ready    <none>          58m   v1.30.0

 

answer : 2

 

2. What is the Networking Solution used by this cluster?

controlplane ~ ➜  ls /etc/cni/net.d/
10-weave.conflist

 

answer : weave

 

3.

controlplane ~ ➜  k get deployments.apps -n kube-system -o wide
NAME      READY   UP-TO-DATE   AVAILABLE   AGE   CONTAINERS   IMAGES                                    SELECTOR
coredns   2/2     2            2           61m   coredns      registry.k8s.io/coredns/coredns:v1.10.1   k8s-app=kube-dns

 

answer : 2

 

4. On which nodes are the weave peers present?

controlplane ~ ➜  kubectl get po -owide -n kube-system | grep weave
weave-net-l5zlx                        2/2     Running   0             71m   192.25.218.6   node01         <none>           <none>
weave-net-p2qf6                        2/2     Running   1 (72m ago)   72m   192.25.218.3   controlplane   <none>           <none>

 

answer : One on every node

 

5. Identify the name of the bridge network/interface created by weave on each node.

controlplane ~ ✖ ip link
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: datapath: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1376 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000
    link/ether ca:1a:64:c6:7a:78 brd ff:ff:ff:ff:ff:ff
4: weave: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1376 qdisc noqueue state UP mode DEFAULT group default qlen 1000
    link/ether ca:76:a7:d1:3f:14 brd ff:ff:ff:ff:ff:ff
6: vethwe-datapath@vethwe-bridge: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1376 qdisc noqueue master datapath state UP mode DEFAULT group default 
    link/ether 1e:2d:ae:6e:0d:e5 brd ff:ff:ff:ff:ff:ff
7: vethwe-bridge@vethwe-datapath: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1376 qdisc noqueue master weave state UP mode DEFAULT group default 
    link/ether 9a:c2:1d:52:11:71 brd ff:ff:ff:ff:ff:ff
8: vxlan-6784: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 65535 qdisc noqueue master datapath state UNKNOWN mode DEFAULT group default qlen 1000
    link/ether 72:bd:d3:5a:b1:b7 brd ff:ff:ff:ff:ff:ff
10: vethwepl24f4ad0@if9: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1376 qdisc noqueue master weave state UP mode DEFAULT group default 
    link/ether 62:be:4c:f2:67:17 brd ff:ff:ff:ff:ff:ff link-netns cni-80ff94c2-a631-eddd-d7dd-be96d43771aa
12: vethwepl8321685@if11: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1376 qdisc noqueue master weave state UP mode DEFAULT group default 
    link/ether 02:8b:0e:8c:40:53 brd ff:ff:ff:ff:ff:ff link-netns cni-8a81d764-0b81-b2bb-866b-c63e01255cdd
6057: eth0@if6058: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1450 qdisc noqueue state UP mode DEFAULT group default 
    link/ether 02:42:c0:19:da:03 brd ff:ff:ff:ff:ff:ff link-netnsid 0
6059: eth1@if6060: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP mode DEFAULT group default 
    link/ether 02:42:ac:19:00:2e brd ff:ff:ff:ff:ff:ff link-netnsid 1

 

answer : weave

 

6. What is the POD IP address range configured by weave?

4: weave: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1376 qdisc noqueue state UP mode DEFAULT group default qlen 1000
    link/ether ca:76:a7:d1:3f:14 brd ff:ff:ff:ff:ff:ff
    
controlplane ~ ➜  ip addr show weave
4: weave: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1376 qdisc noqueue state UP group default qlen 1000
    link/ether ca:76:a7:d1:3f:14 brd ff:ff:ff:ff:ff:ff
    inet 10.244.0.1/16 brd 10.244.255.255 scope global weave
       valid_lft forever preferred_lft forever

 

answer : 10.X.X.X

 

7. What is the default gateway configured on the PODs scheduled on node01? Try scheduling a pod on node01 and check ip route output

 

controlplane ~ ➜  ssh node01

node01 ~ ➜  ip route
default via 172.25.0.1 dev eth1 
10.244.0.0/16 dev weave proto kernel scope link src 10.244.192.0 
172.25.0.0/24 dev eth1 proto kernel scope link src 172.25.0.60 
192.25.218.0/24 dev eth0 proto kernel scope link src 192.25.218.6

 

answer : 10.244.192.0

'IT 기술 > k8s' 카테고리의 다른 글

[cka] CoreDNS in Kubernetes  (0) 2024.08.10
[cka] Service Networking  (0) 2024.08.09
[cka] Deploy Network Solution  (0) 2024.08.09
[cka] CNI  (0) 2024.08.09
[cka] Explore Environment  (0) 2024.08.07

댓글