From 02ac5b82413410ce34409c46f1030c64d77c4d6a Mon Sep 17 00:00:00 2001 From: "Lubomir I. Ivanov" Date: Wed, 22 Aug 2018 23:30:33 +0300 Subject: [PATCH] troubleshooting-kubeadm: add guide for fixing stale CoreDNS pods (#9872) --- .../independent/troubleshooting-kubeadm.md | 23 ++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/content/en/docs/setup/independent/troubleshooting-kubeadm.md b/content/en/docs/setup/independent/troubleshooting-kubeadm.md index 4ba8688e6c..3019f7cac7 100644 --- a/content/en/docs/setup/independent/troubleshooting-kubeadm.md +++ b/content/en/docs/setup/independent/troubleshooting-kubeadm.md @@ -238,4 +238,25 @@ EOF )" ``` -{{% /capture %}} \ No newline at end of file + +## `coredns` pods have `CrashLoopBackOff` or `Error` state + +If you have nodes that are running SELinux with an older version of Docker you might experience a scenario +where the `coredns` pods are not starting. To solve that you can try one of the following options: + +- Upgrade to a [newer version of Docker](/docs/setup/independent/install-kubeadm/#installing-docker). +- [Disable SELinux](https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/6/html/security-enhanced_linux/sect-security-enhanced_linux-enabling_and_disabling_selinux-disabling_selinux). +- Modify the `coredns` deployment to set `allowPrivilegeEscalation` to `true`: + +```bash +kubectl -n kube-system get deployment coredns -o yaml | \ + sed 's/allowPrivilegeEscalation: false/allowPrivilegeEscalation: true/g' | \ + kubectl apply -f - +``` + +{{< warning >}} +**Warning**: Disabling SELinux or setting `allowPrivilegeEscalation` to `true` can compromise +the security of your cluster. +{{< /warning >}} + +{{% /capture %}}