kubeadm: Coredns pods on master are in CrashLoopBackOff after setting up pod networking
Is this a request for help?
Yes, have tried most of the troubleshooting but nothing seems to work.
What keywords did you search in kubeadm issues before filing this one?
CrashLoopBackOff, Coredns, pod networking.
Is this a BUG REPORT or FEATURE REQUEST?
BUG REPORT
Versions
kubeadm version (use kubeadm version):
kubeadm version: &version.Info{Major:"1", Minor:"15", GitVersion:"v1.15.1", GitCommit:"4485c6f18cee9a5d3c3b4e523bd27972b1b53892", GitTreeState:"clean", BuildDate:"2019-07-18T09:15:32Z", GoVersion:"go1.12.5", Compiler:"gc", Platform:"linux/amd64"}
Environment:
- Kubernetes version (use
kubectl version):
Client Version: version.Info{Major:"1", Minor:"15", GitVersion:"v1.15.1", GitCommit:"4485c6f18cee9a5d3c3b4e523bd27972b1b53892", GitTreeState:"clean", BuildDate:"2019-07-18T09:18:22Z", GoVersion:"go1.12.5", Compiler:"gc", Platform:"linux/amd64"}
Server Version: version.Info{Major:"1", Minor:"15", GitVersion:"v1.15.1", GitCommit:"4485c6f18cee9a5d3c3b4e523bd27972b1b53892", GitTreeState:"clean", BuildDate:"2019-07-18T09:09:21Z", GoVersion:"go1.12.5", Compiler:"gc", Platform:"linux/amd64"}
-
Cloud provider or hardware configuration: Deploying a multi node setup on two VMs
-
OS (e.g. from /etc/os-release):
NAME="Ubuntu"
VERSION="16.04.5 LTS (Xenial Xerus)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 16.04.5 LTS"
VERSION_ID="16.04"
HOME_URL="http://www.ubuntu.com/"
SUPPORT_URL="http://help.ubuntu.com/"
BUG_REPORT_URL="http://bugs.launchpad.net/ubuntu/"
VERSION_CODENAME=xenial
UBUNTU_CODENAME=xenial
- Kernel (e.g.
uname -a):
Linux kmaster 4.15.0-55-generic #60~16.04.2-Ubuntu SMP Thu Jul 4 09:03:09 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
- Others: (kubectl get pods -n kube-system)
NAME READY STATUS RESTARTS AGE
coredns-5c98db65d4-gz6bt 0/1 CrashLoopBackOff 114 10h
coredns-5c98db65d4-tkgxt 0/1 CrashLoopBackOff 114 10h
etcd-kmaster 1/1 Running 0 10h
kube-apiserver-kmaster 1/1 Running 0 10h
kube-controller-manager-kmaster 1/1 Running 0 10h
kube-proxy-k4lbf 1/1 Running 0 10h
kube-scheduler-kmaster 1/1 Running 0 10h
weave-net-sbptr 2/2 Running 0 10h
(kubectl describe pod coredns-5c98db65d4-tkgxt -n kube-system)
Name: coredns-5c98db65d4-tkgxt
Namespace: kube-system
Priority: 2000000000
Priority Class Name: system-cluster-critical
Node: kmaster/10.112.187.96
Start Time: Fri, 26 Jul 2019 06:46:34 +0530
Labels: k8s-app=kube-dns
pod-template-hash=5c98db65d4
Annotations: <none>
Status: Running
IP: 10.32.0.4
Controlled By: ReplicaSet/coredns-5c98db65d4
Containers:
coredns:
Container ID: docker://88d8c3243407c82a5eb7c9604f58858d9534dd2a2bc44d8717a404a09fe2566e
Image: k8s.gcr.io/coredns:1.3.1
Image ID: docker-pullable://k8s.gcr.io/coredns@sha256:02382353821b12c21b062c59184e227e001079bb13ebd01f9d3270ba0fcbf1e4
Ports: 53/UDP, 53/TCP, 9153/TCP
Host Ports: 0/UDP, 0/TCP, 0/TCP
Args:
-conf
/etc/coredns/Corefile
State: Waiting
Reason: CrashLoopBackOff
Last State: Terminated
Reason: Error
Exit Code: 2
Started: Fri, 26 Jul 2019 17:01:13 +0530
Finished: Fri, 26 Jul 2019 17:01:43 +0530
Ready: False
Restart Count: 114
Limits:
memory: 170Mi
Requests:
cpu: 100m
memory: 70Mi
Liveness: http-get http://:8080/health delay=60s timeout=5s period=10s #success=1 #failure=5
Readiness: http-get http://:8080/health delay=0s timeout=1s period=10s #success=1 #failure=3
Environment: <none>
Mounts:
/etc/coredns from config-volume (ro)
/var/run/secrets/kubernetes.io/serviceaccount from coredns-token-spm7d (ro)
Conditions:
Type Status
Initialized True
Ready False
ContainersReady False
PodScheduled True
Volumes:
config-volume:
Type: ConfigMap (a volume populated by a ConfigMap)
Name: coredns
Optional: false
coredns-token-spm7d:
Type: Secret (a volume populated by a Secret)
SecretName: coredns-token-spm7d
Optional: false
QoS Class: Burstable
Node-Selectors: beta.kubernetes.io/os=linux
Tolerations: CriticalAddonsOnly
node-role.kubernetes.io/master:NoSchedule
node.kubernetes.io/not-ready:NoExecute for 300s
node.kubernetes.io/unreachable:NoExecute for 300s
Events:
Type | Reason | Age | From | Message
--- | --- | --- | --- | ---
Warning | BackOff | 7m57s (x2606 over 10h) | kubelet, kmaster | Back-off restarting failed container
Warning | Unhealthy | 3m (x342 over 10h) | kubelet, kmaster | Readiness probe failed: HTTP probe failed with statuscode: 503
What happened?
The coredns pods are in CrashLoopBackOff status after the pod networking is setup.
What you expected to happen?
The coredns pods should have been up and running.
How to reproduce it (as minimally and precisely as possible)?
kubeadm init --apiserver-advertise-address=10.112.187.96 --pod-network-cidr=10.244.0.0/16
Anything else we need to know?
I have tried with various pod networking solutions like kube-flannel, wave-kube, calico.
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Reactions: 2
- Comments: 31 (11 by maintainers)
Thanks @anushakamath97 I guess you’ve encountered a bug with CoreDNS on ubuntu.
You need to manually edit CoreDNS ConfigMap:
Then CoreDNS Pod should can work when it restarts.
try a different CNI plugin instead of flannel. i recommend Calico or WeaveNet.
Thanks @SataQiu. The coredns pods show running but there is Readiness probe failure error in the pod. I am running a predator application as well.
Coredns pod describe
Thank you @SataQiu I have tried this and removed loop from the configmap. The problem still persists.
Here is the configmap of coredns