<p>I'm using microk8s on Ubuntu but I have a problem wiht the coredns pod which fails to start and I suspect thats giving me other pods issues.</p>
<p>The Pod is showing a staut of CrashLoopBackOff whe running get pods</p>
<p>Here is the Describe of the pod:</p>
<pre><code>Name:                 coredns-86f78bb79c-bdt7t
Namespace:            kube-system
Priority:             2000000000
Priority Class Name:  system-cluster-critical
Node:                 chwc21ubtu/10.2.2.10
Start Time:           Tue, 25 Jan 2022 09:35:45 +0000
Labels:               k8s-app=kube-dns
                      pod-template-hash=86f78bb79c
Annotations:          cni.projectcalico.org/podIP: 10.1.249.135/32
                      cni.projectcalico.org/podIPs: 10.1.249.135/32
                      scheduler.alpha.kubernetes.io/critical-pod:
Status:               Running
IP:                   10.1.249.135
IPs:
  IP:           10.1.249.135
Controlled By:  ReplicaSet/coredns-86f78bb79c
Containers:
  coredns:
    Container ID:  containerd://045a0cdd5d6e1b736f9f7469a189cbbc2c87df56c2af62bcdc825eda0aa3719c
    Image:         coredns/coredns:1.6.6
    Image ID:      docker.io/coredns/coredns@sha256:41bee6992c2ed0f4628fcef75751048927bcd6b1cee89c79f6acb63ca5474d5a
    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:    1
      Started:      Tue, 25 Jan 2022 11:54:55 +0000
      Finished:     Tue, 25 Jan 2022 11:54:55 +0000
    Ready:          False
    Restart Count:  32
    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://:8181/ready delay=0s timeout=1s period=10s #success=1 #failure=3
    Environment:  &lt;none&gt;
    Mounts:
      /etc/coredns from config-volume (ro)
      /var/run/secrets/kubernetes.io/serviceaccount from coredns-token-rj6x7 (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-rj6x7:
    Type:        Secret (a volume populated by a Secret)
    SecretName:  coredns-token-rj6x7
    Optional:    false
QoS Class:       Burstable
Node-Selectors:  &lt;none&gt;
Tolerations:     CriticalAddonsOnly op=Exists
                 node.kubernetes.io/not-ready:NoExecute op=Exists for 300s
                 node.kubernetes.io/unreachable:NoExecute op=Exists for 300s
Events:
  Type     Reason   Age                     From     Message
  ----     ------   ----                    ----     -------
  Warning  BackOff  3m56s (x663 over 143m)  kubelet  Back-off restarting failed container
</code></pre>
<p>Here is the contents of /etc/resolv/conf:</p>
<pre><code>cat /etc/resolv.conf
# This file is managed by man:systemd-resolved(8). Do not edit.
#
# This is a dynamic resolv.conf file for connecting local clients to the
# internal DNS stub resolver of systemd-resolved. This file lists all
# configured search domains.
#
# Run &quot;resolvectl status&quot; to see details about the uplink DNS servers
# currently in use.
#
# Third party programs must not access this file directly, but only through the
# symlink at /etc/resolv.conf. To manage man:resolv.conf(5) in a different way,
# replace this symlink by a static file or a different symlink.
#
# See man:systemd-resolved.service(8) for details about the supported modes of
# operation for /etc/resolv.conf.

nameserver 127.0.0.53
options edns0 trust-ad
search wnzgl0qq22vevmrhjm1h5bny0c.zx.internal.cloudapp.net
</code></pre>
<p>Here is the contents of the logs:</p>
<pre><code>sudo microk8s.kubectl -n kube-system logs -p coredns-86f78bb79c-bdt7t
plugin/forward: not an IP address or file: &quot;reload&quot;
</code></pre>
<p>Looking atthe config maps for coreDNS it looks like there is an extra value called 'reload' thats being classified as a IP forward/file</p>
<pre><code># Please edit the object below. Lines beginning with a '#' will be ignored,
# and an empty file will abort the edit. If an error occurs while saving this file will be
# reopened with the relevant failures.
#
apiVersion: v1
data:
  Corefile: |
    .:53 {
        errors
        health {
          lameduck 5s
        }
        ready
        log . {
          class error
        }
        kubernetes cluster.local in-addr.arpa ip6.arpa {
          pods insecure
          fallthrough in-addr.arpa ip6.arpa
        }
        prometheus :9153
        forward . 8.8.8.8 8.8.4.4    reload
        loadbalance
    }
kind: ConfigMap
metadata:
  annotations:
    kubectl.kubernetes.io/last-applied-configuration: |
      {&quot;apiVersion&quot;:&quot;v1&quot;,&quot;data&quot;:{&quot;Corefile&quot;:&quot;.:53 {\n    errors\n    health {\n      lameduck 5s\n    }\n    ready\n    log . {\n      class error\n    }\n    kubernetes cluster.local in-addr.arpa ip6.arpa {\n      pods insecure\n      fallthrough in-addr.arpa ip6.arpa\n    }\n    prometheus :9153\n    forward . 8.8.8.8 8.8.4.4    reload\n    loadbalance\n}\n&quot;},&quot;kind&quot;:&quot;ConfigMap&quot;,&quot;metadata&quot;:{&quot;annotations&quot;:{},&quot;creationTimestamp&quot;:&quot;2022-01-25T09:35:32Z&quot;,&quot;labels&quot;:{&quot;addonmanager.kubernetes.io/mode&quot;:&quot;EnsureExists&quot;,&quot;k8s-app&quot;:&quot;kube-dns&quot;},&quot;managedFields&quot;:[{&quot;apiVersion&quot;:&quot;v1&quot;,&quot;fieldsType&quot;:&quot;FieldsV1&quot;,&quot;fieldsV1&quot;:{&quot;f:data&quot;:{&quot;.&quot;:{},&quot;f:Corefile&quot;:{}},&quot;f:metadata&quot;:{&quot;f:annotations&quot;:{&quot;.&quot;:{},&quot;f:kubectl.kubernetes.io/last-applied-configuration&quot;:{}},&quot;f:labels&quot;:{&quot;.&quot;:{},&quot;f:addonmanager.kubernetes.io/mode&quot;:{},&quot;f:k8s-app&quot;:{}}}},&quot;manager&quot;:&quot;kubectl-client-side-apply&quot;,&quot;operation&quot;:&quot;Update&quot;,&quot;time&quot;:&quot;2022-01-25T09:35:32Z&quot;}],&quot;name&quot;:&quot;coredns&quot;,&quot;namespace&quot;:&quot;kube-system&quot;,&quot;resourceVersion&quot;:&quot;518&quot;,&quot;selfLink&quot;:&quot;/api/v1/namespaces/kube-system/configmaps/coredns&quot;,&quot;uid&quot;:&quot;8a73848a-4118-417b-80f5-2175bb64acc4&quot;}}
  creationTimestamp: &quot;2022-01-25T09:35:32Z&quot;
  labels:
    addonmanager.kubernetes.io/mode: EnsureExists
    k8s-app: kube-dns
  name: coredns
  namespace: kube-system
  resourceVersion: &quot;597&quot;
  selfLink: /api/v1/namespaces/kube-system/configmaps/coredns
  uid: 8a73848a-4118-417b-80f5-2175bb64acc4
</code></pre>
<p>I'm lost where to look next - can anyone offer any advice?</p>

Merlin051
<p>the exit code <code>1</code> signifies an application error.</p>
<p><a href="https://i.stack.imgur.com/2TVla.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/2TVla.png" alt="enter image description here" /></a></p>
<p>Check this <a href="https://komodor.com/learn/exit-codes-in-containers-and-kubernetes-the-complete-guide/" rel="nofollow noreferrer">link</a> for more information on exit codes.</p>
