问题场景:
今天部署了K8S主节点,Master节点安装了Calico网络插件,在运行node列表结果是NotReady:
[root@master ~]# kubectl get nodes
NAME STATUS ROLES AGE VERSION
master NotReady master 22h v1.19.4
获取kube-system pods 列表,dns为Pending
[root@master ~]# kubectl get pods -n kube-system
NAME READY STATUS RESTARTS AGE
coredns-6d56c8448f-57njl 0/1 Pending 0 22h
coredns-6d56c8448f-k9nm2 0/1 Pending 0 22h
etcd-master 1/1 Running 1 22h
kube-apiserver-master 1/1 Running 1 22h
kube-controller-manager-master 1/1 Running 1 22h
kube-proxy-9dljn 1/1 Running 1 22h
kube-scheduler-master 1/1 Running 1 22h
查看pod coredns-6d56c8448f-57njl 详情日志没有数据,获取pod详情有错误信息:
[root@master ~]# kubectl logs coredns-6d56c8448f-57njl -n kube-system
[root@master ~]#
[root@master ~]# kubectl describe pods coredns-6d56c8448f-57njl -n kube-system
...其他信息
Events:
Type Reason Age From Message
---- ------ ---- ---- -------
Warning FailedScheduling 21h (x114 over 22h) default-scheduler 0/1 nodes are available: 1 node(s) had taint {node.kubernetes.io/not-ready: }, that the pod didn't tolerate.
Warning FailedScheduling 51s (x25 over 5m2s) default-scheduler 0/1 nodes are available: 1 node(s) had taint {node.kubernetes.io/not-ready: }, that the pod didn't tolerate.
[root@master ~]#
问题解决:

文章讲述了在部署KubernetesMaster节点并安装Calico网络插件后遇到NotReady和Pending问题,通过查看kubelet日志发现cni配置缺失,需要更新到特定版本的Calico以解决问题。
1万+

被折叠的 条评论
为什么被折叠?



