Questão 8 - Informações do Control Plane
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
Essa questão pode ser bem rápida se souber onde procurar.
# Se não quisermos entrar via ssh podemos só conferir os pods namespace kube-system com o sufiixo control-plane
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
# Caso queira conferir 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
# Todos acima já são static-pod e poderíamos saber disso sem precisar entrar aqui via ssh
# se o kubelet é um processo ele será mostrado aqui
ps aux | grep kubelet
# ou conferir o serviço esta rodando
systemctl status kubelet
# Para conferir o dns
kubeclt get pods -n kube-system #e veja que o coredns deve estar rodando
kubectl get ds,deploy -n kubesystem # Só para conferir se esse pode veio de um deploy ou de um daemonset, o que importa é o nome para nós
Por fim teremos no arquivo /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