CKA 模拟真题 Killer.sh | Question 8 | Get Controlplane Information
Use context: kubectl config use-context k8s-c1-H
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 |
Choices of TYPE are: not-installed, process, static-pod, pod
译文
用 ssh cluster1-controlplane1 登录控制板节点。检查控制板组件 kubelet 、kube-apiserver 、kube-scheduler 、kube-controller-manager 和 etcd 是如何在控制板节点上启动/安装的。还要找出 DNS应用程序 的名称以及它是如何在控制平面节点上启动/安装的。
把你的发现写进文件 /opt/course/8/controlplan-components.txt 。该文件的结构应该是这样的。
# /opt/course/8/controlplane-components.txt |
TYPE 为: not-installed , process , static-pod , pod
解答
kubectl config use-context k8s-c1-H |
检查kubelet
ssh cluster1-controlplane1 |
我们可以通过systemd查看哪些组件是通过systemd控制的
root@cluster1-controlplane1:~# find /etc/systemd/system/ | grep kube |
这个集群是用kubeadm设置的,所以我们在默认的清单目录中检查一下
root@cluster1-controlplane1:~# find /etc/kubernetes/manifests/ |
这意味着主要的4个控制板服务被设置为静态Pod。实际上,让我们检查一下在控制平面节点上的kube-system命名空间中运行的所有Pods,在这里我们看到了5个静态pod,后缀为-cluster1-controlplane1
kubectl -n kube-system get pod -o wide | grep controlplane1 |
检查dns
root@cluster1-controlplane1$ kubectl -n kube-system get ds,deploy |
退出controlplane1远程, 编辑文件
# /opt/course/8/controlplane-components.txt |



