Kubernetes在master獲取node顯示狀態NotReady排查


  在Kubernetes的maste獲取node信息提示NotReady

# kubectl get node
NAME           STATUS   ROLES    AGE   VERSION
192.168.1.65   NotReady    <none>   9d    v1.13.4
192.168.1.66   Ready    <none>   9d    v1.13.4

   原因node端kubelet啟動錯誤日志顯示

Calling handler.OnEndpointsUpda

   node端docker也啟動失敗提示文件不存在

docker.service failed to run 'start' task: No such file or directory

 

 

   查看docker的systemctl配置文件

# cat /usr/lib/systemd/system/docker.service 
[Unit]
Description=Docker Application Container Engine
Documentation=https://docs.docker.com
After=network-online.target firewalld.service
Wants=network-online.target
 
[Service]
Type=notify
EnvironmentFile=/run/flannel/subnet.env
ExecStart=/usr/bin/dockerd $DOCKER_NETWORK_OPTIONS
ExecReload=/bin/kill -s HUP $MAINPID
LimitNOFILE=infinity
LimitNPROC=infinity
LimitCORE=infinity
TimeoutStartSec=0
Delegate=yes
KillMode=process
Restart=on-failure
StartLimitBurst=3
StartLimitInterval=60s
 
[Install]
WantedBy=multi-user.target

   是環境變量文件subnet.env文件不存在原因是網絡flanneld沒啟動,啟動即可

systemctl start flanneld
systemctl enable flanneld

   NotReady原因不是因為docker未啟動報錯信息如下

Setting node annotation to enable volume controller attach/detach

   原因,證書問題,移動node下證書

/opt/kubernetes/ssl

   重啟kubelet

systemctl daemon-reload
systemctl restart kubelet

   PS:移動時這個證書不要移動

kubelet-client-2020-03-13-17-19-22.pem

   其實證書kubelet-client-current.pem是軟鏈接該證書的

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM