首页 > 编程语言 >[k8s]node-local-dns CrashLoopBackOff

[k8s]node-local-dns CrashLoopBackOff

时间:2022-08-25 10:34:28浏览次数:123  
标签:node __ kube 192.168 TCP dns CrashLoopBackOff k8s local

1. 修改配置文件

/etc/kubernetes/plugins/dns-cache/nodelocaldns.yaml

sed 's/k8s.gcr.io/gcr.azk8s.cn\/google_containers/g
s/__PILLAR__DNS__SERVER__/192.168.0.10/g
s/__PILLAR__UPSTREAM__SERVERS__/192.168.120.52/g
s/__PILLAR__DNS__DOMAIN__/cluster.local/g' nodelocaldns.yaml |
kubectl apply -n kube-system -f -

2. 查看 DNSUPstream

[root@m1 ~]# kubectl get svc -n kube-system | grep dns
kube-dns            ClusterIP   192.168.0.10     <none>        53/UDP,53/TCP,9153/TCP   6d20h
kube-dns-upstream   ClusterIP   192.168.120.52   <none>        53/UDP,53/TCP            6d20h
node-local-dns      ClusterIP   None             <none>        9253/TCP                 6d20h

3. 删除pod

标签:node,__,kube,192.168,TCP,dns,CrashLoopBackOff,k8s,local
From: https://www.cnblogs.com/leoshi/p/16623426.html

相关文章