CKA 模拟真题 Killer.sh | Question 18 | Fix Kubelet
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 .
译文
在 cluster3-node1 上运行的 kubelet 似乎有问题。 修复该问题并确认集群中的 cluster3-node1 节点处于就绪状态。 之后,您应该可以在 cluster3-node1 上调度 Pod。
将问题原因写入 /opt/course/18/reason.txt 。
解答
kubectl config use-context k8s-c3-CCC |
查看节点并远程连接到节点
k get node |
检查 kubelet 服务
root@cluster3-node1:~# systemctl status kubelet |
启动服务并检查状态
root@cluster3-node1:~# systemctl enable kubelet --now |
无法启动, 查看详细错误,发现是路径不对,检查服务配置文件, 并获取kubelet真实路径
journalctl -xe |

修改配置文件
vim /etc/systemd/system/kubelet.service.d/10-kubeadm.conf |
修改文件后,重载配置并启动服务
systemctl daemon-reload && systemctl restart kubelet |
原因
echo "wrong path to kubelet binary specified in service config" > /opt/course/18/reason.txt |
本博客所有文章除特别声明外,均采用 CC BY-NC-SA 4.0 许可协议。转载请注明来源 Hao DevSecOps!
评论



