How to restart kubernetes nodes?

前端 未结 6 1782
予麋鹿
予麋鹿 2020-12-24 00:53

The status of nodes is reported as unknown

\"conditions\": [
          {
            \"type\": \"Ready\",
            \"status\": \"Unknown\",
          


        
6条回答
  •  礼貌的吻别
    2020-12-24 01:37

    In my case I am running 3 nodes in VM's by using Hyper-V. By using the following steps I was able to "restart" the cluster after restarting all VM's.

    1. (Optional) Swap off

      $ swapoff -a

    2. You have to restart all Docker containers

      $ docker restart $(docker ps -a -q)

    3. Check the nodes status after you performed step 1 and 2 on all nodes (the status is NotReady)

      $ kubectl get nodes

    4. Restart the node

      $ systemctl restart kubelet

    5. Check again the status (now should be in Ready status)

    Note: I do not know if it does metter the order of nodes restarting, but I choose to start with the k8s master node and after with the minions. Also it will take a little bit to change the node state from NotReady to Ready

提交回复
热议问题