1.题目

Now the node01 is not ready, please find out the root cause and make it to ready, then create a pod that make sure it is running on node01.

2.解析

本题目考测troubleshooting,node01是worker node,大概率都是kubelet出了问题。

3.答案

  1. 进入node01节点,查看kubelet运行情况

    1. # 进入node01节点
    2. ssh node01
    3. # 查看kubelet状态
    4. systemctl status kubelet
    5. # 发现kubelet运行未运行,因此尝试重启
    6. systemctl start kubelet
  2. 再次查看node01状态

    1. kubectl get node
  3. node01恢复正常,根据题意创建一个pod在node01上运行(cluster只有一个节点)

    1. # 创建pod
    2. kubectl run test --image=nginx
    3. # 查看pod
    4. kubectl get pod -owide