본문 바로가기
IT 기술/k8s

[cka] CNI

by Geunny 2024. 8. 9.
반응형

1. Inspect the kubelet service and identify the container runtime endpoint value is set for Kubernetes.

 

ps -ef | grep kubelet | grep runtime
root        4338       1  0 12:18 ?        00:00:03 /usr/bin/kubelet --bootstrap-kubeconfig=/etc/kubernetes/bootstrap-kubelet.conf --kubeconfig=/etc/kubernetes/kubelet.conf --config=/var/lib/kubelet/config.yaml --container-runtime-endpoint=unix:///var/run/containerd/containerd.sock --pod-infra-container-image=registry.k8s.io/pause:3.9

 

answer : unix:///var/run/containerd/containerd.sock

 

 

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

 

controlplane ~ ➜  ls /opt/cni
bin

 

answer : /etc/cni

 

 

3, Identify which of the below plugins is not available in the list of available CNI plugins on this host?

controlplane ~ ➜  ls /opt/cni/bin
bandwidth  dummy     host-device  loopback  ptp     tap     vrf
bridge     firewall  host-local   macvlan   sbr     tuning
dhcp       flannel   ipvlan       portmap   static  vlan

 

 

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

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

 

answer : flannel

 

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

controlplane ~ ➜  cat /etc/cni/net.d/10-flannel.conflist
{
  "name": "cbr0",
  "cniVersion": "0.3.1",
  "plugins": [
    {
      "type": "flannel",
      "delegate": {
        "hairpinMode": true,
        "isDefaultGateway": true
      }
    },
    {
      "type": "portmap",
      "capabilities": {
        "portMappings": true
      }
    }
  ]
}

 

answer : flannel

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

[cka] Networking Weave  (0) 2024.08.09
[cka] Deploy Network Solution  (0) 2024.08.09
[cka] Explore Environment  (0) 2024.08.07
[cka] Storage Class  (0) 2024.08.06
[cka] Persistent Volume Claims  (0) 2024.07.28

댓글