How to debug when Kubernetes nodes are in 'Not Ready' state

后端 未结 5 1973
青春惊慌失措
青春惊慌失措 2021-02-02 05:18

I initialized the master node and add 2 worker nodes, but only master and one of the worker node show up when I run the following command:

kubectl get nodes
         


        
5条回答
  •  死守一世寂寞
    2021-02-02 06:04

    First, describe nodes and see if it reports anything:

    $ kubectl describe nodes

    Look for conditions, capacity and allocatable:

    Conditions:
      Type              Status
      ----              ------
      OutOfDisk         False
      MemoryPressure    False
      DiskPressure      False
      Ready             True
    Capacity:
     cpu:       2
     memory:    2052588Ki
     pods:      110
    Allocatable:
     cpu:       2
     memory:    1950188Ki
     pods:      110
    

    If everything is alright here, SSH into the node and observe kubelet logs to see if it reports anything. Like certificate erros, authentication errors etc.

    If kubelet is running as a systemd service, you can use

    $ journalctl -u kubelet

提交回复
热议问题