본문 바로가기

CKA &. CKAD/Networking

Practice Test - Explore CNI weave

ㅁ Inspect the kubelet service and identify the newok plugin configured for Kubernetes.

Run ps -aux | grep kubelet command

 

[DOCKER]

[CNI]

ETHERNET]

[CGROUPFS]

[CISCO]

 

ps -aux | grep kubelet | grep network-plugin
root     14259  3.3  4.7 1856680 97384 ?       Ssl  02:10   0:06 /usr/bin/kubelet --bootstrap-kubeconfig=/etc/kubernetes/bootstrap-kubelet.conf --kubeconfig=/etc/kubernetes/kubele.conf --config=/var/lib/kubelet/config.yaml --cgroup-driver=systemd --network-plugin=cni --pod-infra-container-image=k8s.gcr.io/pause:3.1 --cni-bin-dir=/opt/cni/bin

 

network-plugin 부분을 찾아 확인

--network-plugin=cni

 

ㅁ What is the path configured with all binaries of CNI supported plugins?

 

[/opt/cni/bin]

 

ps -aux | grep kubelet | grep cni

에서 --cni-bin-dir 부분 확인

$ ps -aux | grep kubelet | grep cni
root     14259  3.2  4.8 1856936 99504 ?       Ssl  02:10   0:17 /usr/bin/kubelet --bootstrap-kubeconfig=/etc/kubernetes/bootstrap-kubelet.conf --kubeconfig=/etc/kubernetes/kubelet.conf --config=/var/lib/kubelet/config.yaml --cgroup-driver=systemd --network-plugin=cni --pod-infra-container-image=k8s.gcr.io/pause:3.1 --cni-bin-dir=/opt/cni/bin

 

ㅁ Identify which of the below plugins is not available in the list of available CNI plougins on this hosts?

 

[dhcp]  [bridge]  [vlan]  [cisco]

$ ls /opt/cni/bin

에서 나오지 않는 CNI list를 찾는다.

$ ls /opt/cni/bin

bandwidth  firewall     ipvlan    portmap  static  weave-ipam
bridge     host-device  loopback  ptp      tuning  weave-net
dhcp       host-local   macvlan   sbr      vlan    weave-plugin-2.8.1

 

ㅁ What is the CNI plugin configured to be used on this kubernetes cluster?

[calico]  [bridge]  [flannel]  [weave]

 

$ ls /etc/cni/net.d

에서 나온 cni plugin이 현재 kubernetes cluster에서 사용중인 CNI 이다.

$ ls /etc/cni/net.d

10-weave.conflist

 

ㅁ What binary executable file will be run by kubelet after a container and its associated namespace are created.

 

[bridge]  [weave]  [weave-ipam]  [weave-net]

 

$ cat /etc/cni/net.d/10-weave.conflist 

{
    "cniVersion": "0.3.0",
    "name": "weave",
    "plugins": [
        {
            "name": "weave",
            "type": "weave-net",
            "hairpinMode": true
        },
        {
            "type": "portmap",
            "capabilities": {"portMappings": true},
            "snat": true
        }
    ]
}

'CKA &. CKAD > Networking' 카테고리의 다른 글

Practice Test - Networking Weave  (0) 2021.03.31
Practice Test - Deploy Network Solution  (0) 2021.03.31
WeaveWorks (CNI)  (0) 2021.03.31
CNI in Kubernetes  (0) 2021.03.31
Pod Networking  (0) 2021.03.31