Skip to main content

Question 8 - Get Control Plane Information

Question 8 | Get Controlplane Information

Ssh into the controlplane node with ssh cluster1-controlplane1. Check how the controlplane components kubelet, kube-apiserver, kube-scheduler, kube-controller-manager and etcd are started/installed on the controlplane node. Also find out the name of the DNS application and how it's started/installed on the controlplane node.

Write your findings into file /opt/course/8/controlplane-components.txt. The file should be structured like:

/opt/course/8/controlplane-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


This question can be very quick if you know where to look.

# If we don't want to ssh in we can just check the pods in kube-system namespace with the control-plane suffix
kubectl get pods -n kube-system -o name | grep control-plane
pod/etcd-kind-cluster-control-plane
pod/kube-apiserver-kind-cluster-control-plane
pod/kube-controller-manager-kind-cluster-control-plane
pod/kube-scheduler-kind-cluster-control-plane

# If you want to check via ssh
ssh cluster1-controlplane1
root@cluster1-controlplane1:~# ls -lha /etc/kubernetes/manifests/
kube-controller-manager.yaml
etcd.yaml
kube-apiserver.yaml
kube-scheduler.yaml
# All above are already static-pods and we could know this without having to ssh in here

# if kubelet is a process it will be shown here
ps aux | grep kubelet
# or check if the service is running
systemctl status kubelet

# To check dns
kubeclt get pods -n kube-system # and see that coredns should be running
kubectl get ds,deploy -n kubesystem # Just to check if this pod came from a deploy or daemonset, what matters is the name for us

Finally we will have in file /opt/course/8/controlplane-components.txt.

kubelet: process
kube-apiserver: static-pod
kube-scheduler: static-pod
kube-controller-manager: static-pod
etcd: static-pod
dns: pod coredns