Use context: kubectl config use-context k8s-c3-CCC

There seems to be an issue with the kubelet not running on cluster3-node1 . Fix it and confirm that cluster has node cluster3-node1 available in Ready state afterwards. You should be able to schedule a Pod on cluster3-node1 afterwards.

Write the reason of the issue into /opt/course/18/reason.txt .


译文:

似乎有一个问题,kubelet没有在 cluster3-node1 上运行。修复它,并确认集群有节点 cluster3-node1 在就绪状态后可用。之后你应该可以在 cluster3-node1 上安排一个Pod。

把问题的原因写进 /opt/course/18/reason.txt


解答:
kubectl config use-context k8s-c3-CCC

查看节点并远程连接到节点

k get node
ssh cluster3-node1

检查 kubelet 服务

root@cluster3-node1:~# systemctl status kubelet

file

启动服务并检查状态

root@cluster3-node1:~# systemctl enable kubelet --now
root@cluster3-node1:~# systemctl status kubelet

无法启动, 查看详细错误,发现是路径不对,检查服务配置文件, 并获取kubelet真实路径

journalctl -xe

file file

修改配置文件

vim /etc/systemd/system/kubelet.service.d/10-kubeadm.conf

file

修改文件后,重载配置并启动服务

systemctl daemon-reload && systemctl restart kubelet
systemctl status kubelet

file

原因

echo "wrong path to kubelet binary specified in service config" > /opt/course/18/reason.txt

Killer.sh CKA模拟题目 汇总