k8s创建完集群之后coredns一直处于pending状态
按照官网教程https://kubernetes.io/zh/docs/setup/production-environment/tools/kubeadm/create-cluster-kubeadm/,master节点kubectl init,每个从节点kubectl join之后,在master节点执行kubectl get pods -n kube-system,发现coredns一直处于pending状态
网上找的资料都是安装一个网络插件,怕他们乱写不敢这样做,最后在官网上找到了答案,地址是:https://kubernetes.io/zh/docs/setup/production-environment/tools/kubeadm/troubleshooting-kubeadm/
最后选择的网络插件是:calico,安装url:https://docs.projectcalico.org/getting-started/kubernetes/self-managed-onprem/onpremises,具体命令:
curl https://docs.projectcalico.org/manifests/calico.yaml -O
kubectl apply -f calico.yaml