coredns一直ContainerCreating

来源:4-7 初始化Kubernetes Master

慕九州2424660

2024-12-25

图片描述图片描述

写回答

1回答

清风

2025-01-06

参考:https://stackoverflow.com/questions/52645473/coredns-fails-to-run-in-kubernetes-cluster


  1. open and edit the configmap of coredns.

    kubectl edit cm coredns -n kube-system

  2. "replacing proxy . /etc/resolv.conf with the ip address of your upstream DNS, for example proxy . 8.8.8.8." According to the link in the output of the coredns log (at the end of the page)

  3. save and exit.

  4. kubectl get pods -n kube-system -oname |grep coredns |xargs kubectl delete -n kube-system

The reason of the problem is explained in the link. You can find this link in the output of this cmd

kubectl logs coredns-7d9cd4f75b-cpwxp -n kube-system


0
0

Kubernetes 入门到进阶实战,系统性掌握 K8s 生产实践

阿里云最有价值专家亲授,云原生时代必备技能

1501 学习 · 613 问题

查看课程