새소식

Recent Study/udemy - CKA with Practice Tests

KodeKloud - Test Record (section 9)

  • -

1. What is the MAC address assigned to node01?

> ssh node01

> ip address

 

2. We use Containerd as our container runtime. What is the interface/bridge created by Containerd on the controlplane node?

> ip address show type bridge

 

3. If you were to ping google from the controlplane node, which route does it take? What is the IP address of the Default Gateway?

> ip route

 

4. What is the port the kube-scheduler is listening on in the controlplane node?

> netstat -npl | grep -i scheduler

 

5. Notice that ETCD is listening on two ports. Which of these have more client connections established?

> netstat -npa | grep -i etcd

> netstat -npa | grep -i etcd | grep -i 2379 | wc -l

 

Explore CNI

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

> ps -aux | grep -i kubelet | grep container-runtime

 

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

> cd /opt/cni/bin

> ls /etc/cni/net.d

 

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

> cd /etc/cni/net.d

> cat 10-flannel.conflist

 

9. Deploy weave-net networking solution to the cluster.
NOTE: - We already have provided a weave manifest file under the /root/weave directory.

> kubectl apply -f /root/weave/weave-daemonset-k8s.yaml

 

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

> cd /etc/cni/net.d

> ls

 

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

> k get pods -n kube-system

 

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

> k get pods -n kube-system

> k logs -n kube-system weave-net-56tfn

 

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

> k run busybox --image=busybox --dry-run=client -o yaml -- sleep 1000 > busybox.yaml

> vi busybox.yaml (spec: nodeName: node01 추가)

> k apply -f busybox.yaml

> k exec busybox -- ip route 

 

14. What is the range of IP addresses configured for PODs on this cluster?

> k get all --all-namespaces

> k logs pod/weave-net-p842k -n kube-system

 

15. What is the IP Range configured for the services within the cluster?

> cd /etc/kubenetes/manifests/

> cat kube-apiserver.yaml

 

16. what type of proxy is the kube-proxy configured to use?

> k logs kube-proxy-sj8ln -n kube-system

 

17. How does this Kubernetes cluster ensure that a kube-proxy pod runs on all nodes in the cluster? Inspect the kube-proxy pods and try to identify how they are deployed.

> k get all --all-namespaces

 

18. What is the name of the service created for accessing CoreDNS?

> k get svc -n kube-system

 

19. Where is the configuration file located for configuring the CoreDNS service?

> /etc/coredns/Corefile

 

20. We have deployed a set of PODs and Services in the default and payroll namespaces. Inspect them and go to the next question.

> k get configmap -n kube-system

> k describe configmap coredns -n kube-system

 

21. From the hr pod nslookup the mysql service and redirect the output to a file /root/CKA/nslookup.out

> k exec hr -- nslookup mysql.payroll > /root/CKA/nslookup.out

Contents

포스팅 주소를 복사했습니다

이 글이 도움이 되었다면 공감 부탁드립니다.