Kubernetes CKA sample exam question 56 with answer

Question
SSH into the master node with ssh cluster1-master1. Check how the master components kubelet, kube-apiserver, kube-scheduler, kube-controller-manager and etcd are started/installed on the master node.
Also, find out the name of the DNS application and how it's started/installed on the master node.
Write your findings into the file /opt/course/8/master-components.txt. The file should be structured like:

# cat /opt/course/8/master-components.txt
kubelet: [TYPE]
kube-apiserver: [TYPE]
kube-scheduler: [TYPE]
kube-controller-manager: [TYPE]
etcd: [TYPE]
dns: [TYPE] [NAME]
choices of [TYPE] are not-installed, process, static-pod, pod

Answer
First login and check kubelet. Most of the cases - it runs as a process:
ps aux|grep kubelet|grep --color config
Grab --config from the output and check the static pods path:
cat /var/lib/kubelet/config.yaml|grep static
List the files inside static pod path:
ls -la /etc/kubernetes/manifests/
We can notice that the following are static pods:
-rw------- 1 root root 2482 Nov 25 20:21 etcd.yaml
-rw------- 1 root root 3642 Nov 25 20:21 kube-apiserver.yaml
-rw------- 1 root root 2951 Nov 25 20:21 kube-controller-manager.yaml
-rw------- 1 root root 1441 Nov 25 20:21 kube-scheduler.yaml
Check all items from kube-system namespace:
kubectl -n kube-system get all
Can be observed that DNS solution is coredns and it runs as 2 pods inside a deployment.
So the final file /opt/course/8/master-components.txt contents will be:
kubelet: process
kube-apiserver: static-pod
kube-scheduler: static-pod
kube-controller-manager: static-pod
etcd: static-pod
dns: pod coredns