Kubernetes集群中处于待定状态的Coredns [英] Coredns in pending state in Kubernetes cluster

查看:90
本文介绍了Kubernetes集群中处于待定状态的Coredns的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试配置2节点Kubernetes集群.首先,我尝试在CentOS VM上配置集群的主节点.我已经使用'kubeadm init --apiserver-advertise-address = 172.16.100.6 --pod-network-cidr = 10.244.0.0/16'初始化了集群,并将法兰网部署到了集群.但是当我执行"kubectl获取节点"时,我得到以下输出----

I am trying to configure a 2 node Kubernetes cluster. First I am trying to configure the master node of the cluster on a CentOS VM. I have initialized the cluster using 'kubeadm init --apiserver-advertise-address=172.16.100.6 --pod-network-cidr=10.244.0.0/16' and deployed the flannel network to the cluster. But when I do 'kubectl get nodes', I get the following output ----

[root@kubernetus ~]# kubectl get nodes
NAME         STATUS     ROLES    AGE   VERSION
kubernetus   NotReady   master   57m   v1.12.0

以下是"kubectl get pods --all-namespaces -o wide"的输出

Following is the output of 'kubectl get pods --all-namespaces -o wide ' ----

[root@kubernetus ~]# kubectl get pods --all-namespaces -o wide
NAMESPACE     NAME                                 READY   STATUS    RESTARTS   AGE   IP             NODE         NOMINATED NODE
kube-system   coredns-576cbf47c7-9x59x             0/1     Pending   0          58m   <none>         <none>       <none>
kube-system   coredns-576cbf47c7-l52wc             0/1     Pending   0          58m   <none>         <none>       <none>
kube-system   etcd-kubernetus                      1/1     Running   2          57m   172.16.100.6   kubernetus   <none>
kube-system   kube-apiserver-kubernetus            1/1     Running   2          57m   172.16.100.6   kubernetus   <none>
kube-system   kube-controller-manager-kubernetus   1/1     Running   1          57m   172.16.100.6   kubernetus   <none>
kube-system   kube-proxy-hr557                     1/1     Running   1          58m   172.16.100.6   kubernetus   <none>
kube-system   kube-scheduler-kubernetus            1/1     Running   1          57m   172.16.100.6   kubernetus   <none>

coredns很长时间处于挂起状态.我已经删除了docker和kubectl,kubeadm,kubelet,没有次数&尝试重新创建集群,但是每次显示相同的输出时.有人可以帮我解决这个问题吗?

coredns is in a pending state for a very long time. I have removed docker and kubectl, kubeadm, kubelet a no of times & tried to recreate the cluster, but every time it shows the same output. Can anybody help me with this issue?

推荐答案

尝试安装Pod网络附加组件(基于

Try to install Pod network add-on (Base on this guide).

运行此行:

kubectl apply -f https://docs.projectcalico.org/v3.14/manifests/calico.yaml

这篇关于Kubernetes集群中处于待定状态的Coredns的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆