CKA (Certified Kubernetes Administrator)/Kode Kloud

07. Networking - Networking Weave

seulseul 2022. 1. 27. 16:56
07. Networking

01. Explore Environment
02. CNI weave
03. Deploy Network Solution
04. Networking Weave
05. Service Networking
06. CoreDNS in Kubernetes
07. CKA – Ingress Networking – 1
08. CKA – Ingress Networking – 2
 

01. How many Nodes are part of this cluster?

Including master and worker nodes

 

ask : 2

root@controlplane:~# k get node
NAME           STATUS   ROLES                  AGE   VERSION
controlplane   Ready    control-plane,master   89m   v1.20.0
node01         Ready    <none>                 88m   v1.20.0

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

 

ask : weave-net

daemonset.apps/weave-net 이 보여서 weave 로 선택함.

 

 

root@controlplane:~# k get all -n kube-system
NAME                                       READY   STATUS    RESTARTS   AGE
pod/coredns-74ff55c5b-fbptp                1/1     Running   0          90m
pod/coredns-74ff55c5b-s2tpp                1/1     Running   0          90m
pod/etcd-controlplane                      1/1     Running   0          90m
pod/kube-apiserver-controlplane            1/1     Running   0          90m
pod/kube-controller-manager-controlplane   1/1     Running   0          90m
pod/kube-proxy-5hcgj                       1/1     Running   0          90m
pod/kube-proxy-n8g6r                       1/1     Running   0          90m
pod/kube-scheduler-controlplane            1/1     Running   0          90m
pod/weave-net-ck4pl                        2/2     Running   0          90m
pod/weave-net-m2j42                        2/2     Running   1          90m

NAME               TYPE        CLUSTER-IP   EXTERNAL-IP   PORT(S)                  AGE
service/kube-dns   ClusterIP   10.96.0.10   <none>        53/UDP,53/TCP,9153/TCP   90m

NAME                        DESIRED   CURRENT   READY   UP-TO-DATE   AVAILABLE   NODE SELECTOR            AGE
daemonset.apps/kube-proxy   2         2         2       2            2           kubernetes.io/os=linux   90m
daemonset.apps/weave-net    2         2         2       2            2           <none>                   90m

NAME                      READY   UP-TO-DATE   AVAILABLE   AGE
deployment.apps/coredns   2/2     2            2           90m

NAME                                DESIRED   CURRENT   READY   AGE
replicaset.apps/coredns-74ff55c5b   2         2         2       90m

 

03. How many weave agents/peers are deployed in this cluster?

ask :) 2 

 

04. On which nodes are the weave peers present?

어떤 노드에 weave 피어가 있습니까?

 

ask : one or every node

 

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

각 노드에서 weave에 의해 생성된 브리지 네트워크/인터페이스의 이름을 식별합니다.

ask : weave


# hint
iplink
root@controlplane:~# ip a | grep -B2 10.50    
5: weave: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1376 qdisc noqueue state UP group default qlen 1000
    link/ether ae:52:7a:63:3c:62 brd ff:ff:ff:ff:ff:ff
    inet 10.50.0.1/16 brd 10.50.255.255 scope global weave
root@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: docker0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN mode DEFAULT group default 
    link/ether 02:42:ce:eb:0a:e8 brd ff:ff:ff:ff:ff:ff
3: datapath: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1376 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000
    link/ether 8a:24:d2:37:35:2a brd ff:ff:ff:ff:ff:ff
5: weave: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1376 qdisc noqueue state UP mode DEFAULT group default qlen 1000
    link/ether ae:52:7a:63:3c:62 brd ff:ff:ff:ff:ff:ff
7: vethwe-datapath@vethwe-bridge: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1376 qdisc noqueue master datapath state UP mode DEFAULT group default 
    link/ether a2:27:75:cb:dd:0f brd ff:ff:ff:ff:ff:ff
8: vethwe-bridge@vethwe-datapath: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1376 qdisc noqueue master weave state UP mode DEFAULT group default 
    link/ether 9e:1e:2c:e5:87:c1 brd ff:ff:ff:ff:ff:ff
9: vxlan-6784: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 65535 qdisc noqueue master datapath state UNKNOWN mode DEFAULT group default qlen 1000
    link/ether c2:17:ac:29:1e:10 brd ff:ff:ff:ff:ff:ff
11: vethwepl6115799@if10: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1376 qdisc noqueue master weave state UP mode DEFAULT group default 
    link/ether 42:02:81:c2:eb:21 brd ff:ff:ff:ff:ff:ff link-netnsid 2
13: vethwepl02e3562@if12: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1376 qdisc noqueue master weave state UP mode DEFAULT group default 
    link/ether fe:a8:8d:17:ba:0a brd ff:ff:ff:ff:ff:ff link-netnsid 3
22888: eth0@if22889: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1450 qdisc noqueue state UP mode DEFAULT group default 
    link/ether 02:42:0a:3d:cf:0c brd ff:ff:ff:ff:ff:ff link-netnsid 0
22890: eth1@if22891: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP mode DEFAULT group default 
    link/ether 02:42:ac:19:00:1f brd ff:ff:ff:ff:ff:ff link-netnsid 1

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

weave에서 구성한 POD IP 주소 범위는 무엇입니까?

 

ask : 10.x.x.x

Run the command    

ip addr show weave

root@controlplane:~# ip addr show weave
5: weave: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1376 qdisc noqueue state UP group default qlen 1000
    link/ether ae:52:7a:63:3c:62 brd ff:ff:ff:ff:ff:ff
    inet 10.50.0.1/16 brd 10.50.255.255 scope global weave
       valid_lft forever preferred_lft forever

 

07. What is the default gateway configured on the PODs scheduled on node01?

node01에 예약된 POD에 구성된 기본 게이트웨이는 무엇입니까?

Try scheduling a pod on node01 and check ip route output

node01에서 포드를 예약하고 ip 경로 출력을 확인하십시오.