<p>I have solved the coredns problem by running</p>
<pre><code>sudo sed -i '$ s/$/ cgroup_enable=cpuset cgroup_enable=memory cgroup_memory=1/' /boot/cmdline.txt
</code></pre>
<p>in my raspbian.</p>

CC BY-SA 4.0
2022-08-30T11:43:52.550Z
2022-08-30T11:43:52.550Z
Dániel Kis
<p>I have installed a microk8s on my 64 bit raspbian, and enabled a dns server by</p>
<pre><code>microk8s enable dns
</code></pre>
<p>Coredns is continously cashes:</p>
<pre><code>microk8s.kubectl describe pod coredns-64c6478b6c-snkxx --namespace=kube-system

Namespace:            kube-system
Priority:             2000000000
Priority Class Name:  system-cluster-critical
Node:                 raspberrypi4-docker3/192.168.0.129
Start Time:           Fri, 12 Aug 2022 18:28:54 +0200
Labels:               k8s-app=kube-dns
                      pod-template-hash=64c6478b6c
Annotations:          cni.projectcalico.org/podIP: 10.1.174.245/32
                      cni.projectcalico.org/podIPs: 10.1.174.245/32
                      priorityClassName: system-cluster-critical
Status:               Running
IP:                   10.1.174.245
IPs:
  IP:           10.1.174.245
Controlled By:  ReplicaSet/coredns-64c6478b6c
Containers:
  coredns:
    Container ID:  containerd://194f8be3d70a7141148c63d2dd92c24e47e40af6c0fdb6d582885a60d38d8e62
    Image:         coredns/coredns:1.8.0
    Image ID:      docker.io/coredns/coredns@sha256:cc8fb77bc2a0541949d1d9320a641b82fd392b0d3d8145469ca4709ae769980e
    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:       StartError
      Message:      failed to create containerd task: failed to create shim: OCI runtime create failed: container_linux.go:380: starting container process caused: process_linux.go:545: container init caused: process_linux.go:508: setting cgroup config for procHooks process caused: openat2 /sys/fs/cgroup/kubepods/burstable/podfb1a1616-e10f-4916-9df8-160a92cf4340/194f8be3d70a7141148c63d2dd92c24e47e40af6c0fdb6d582885a60d38d8e62/memory.max: no such file or directory: unknown
      Exit Code:    128
      Started:      Thu, 01 Jan 1970 01:00:00 +0100
      Finished:     Fri, 12 Aug 2022 18:32:26 +0200
    Ready:          False
    Restart Count:  6
    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 kube-api-access-hs9ph (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
  kube-api-access-hs9ph:
    Type:                    Projected (a volume that contains injected data from multiple sources)
    TokenExpirationSeconds:  3607
    ConfigMapName:           kube-root-ca.crt
    ConfigMapOptional:       &lt;nil&gt;
    DownwardAPI:             true
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
  ----     ------     ----                    ----               -------
  Normal   Scheduled  4m42s                   default-scheduler  Successfully assigned kube-system/coredns-64c6478b6c-snkxx to raspberrypi4-docker3
  Normal   Pulled     4m41s (x2 over 4m42s)   kubelet            Container image &quot;coredns/coredns:1.8.0&quot; already present on machine
  Normal   Created    4m41s (x2 over 4m42s)   kubelet            Created container coredns
  Warning  Failed     4m41s (x2 over 4m42s)   kubelet            Error: failed to create containerd task: failed to create shim: OCI runtime create failed: container_linux.go:380: starting container process caused: process_linux.go:545: container init caused: process_linux.go:508: setting cgroup config for procHooks process caused: openat2 /sys/fs/cgroup/kubepods/burstable/podfb1a1616-e10f-4916-9df8-160a92cf4340/coredns/memory.max: no such file or directory: unknown
  Warning  BackOff    4m39s (x2 over 4m40s)   kubelet            Back-off restarting failed container
  Normal   Pulled     2m32s (x4 over 3m51s)   kubelet            Container image &quot;coredns/coredns:1.8.0&quot; already present on machine
  Normal   Created    2m32s (x4 over 3m51s)   kubelet            Created container coredns
  Warning  Failed     2m32s (x4 over 3m51s)   kubelet            Error: failed to create containerd task: failed to create shim: OCI runtime create failed: container_linux.go:380: starting container process caused: process_linux.go:545: container init caused: process_linux.go:508: setting cgroup config for procHooks process caused: openat2 /sys/fs/cgroup/kubepods/burstable/podfb1a1616-e10f-4916-9df8-160a92cf4340/coredns/memory.max: no such file or directory: unknown
  Warning  BackOff    2m30s (x13 over 3m51s)  kubelet            Back-off restarting failed container
</code></pre>
<p>How can I solve this CrashLoopBackOff problem?</p>

<kubernetes>
CoreDNS is not working after installation of microk8s
Dániel Kis
# CoreDNS is not working after installation of microk8s

(Asked by: username_0 on 2022-08-17)

I have installed a microk8s on my 64 bit raspbian, and enabled a dns server by
microk8s enable dns

Coredns is continously cashes:
microk8s.kubectl describe pod coredns-64c6478b6c-snkxx --namespace=kube-system

Namespace:            kube-system
Priority:             2000000000
Priority Class Name:  system-cluster-critical
Node:                 raspberrypi4-docker3/192.168.0.129
Start Time:           Fri, 12 Aug 2022 18:28:54 +0200
Labels:               k8s-app=kube-dns
                      pod-template-hash=64c6478b6c
Annotations:          cni.projectcalico.org/podIP: 10.1.174.245/32
                      cni.projectcalico.org/podIPs: 10.1.174.245/32
                      priorityClassName: system-cluster-critical
Status:               Running
IP:                   10.1.174.245
IPs:
  IP:           10.1.174.245
Controlled By:  ReplicaSet/coredns-64c6478b6c
Containers:
  coredns:
    Container ID:  containerd://194f8be3d70a7141148c63d2dd92c24e47e40af6c0fdb6d582885a60d38d8e62
    Image:         coredns/coredns:1.8.0
    Image ID:      docker.io/coredns/coredns@sha256:cc8fb77bc2a0541949d1d9320a641b82fd392b0d3d8145469ca4709ae769980e
    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:       StartError
      Message:      failed to create containerd task: failed to create shim: OCI runtime create failed: container_linux.go:380: starting container process caused: process_linux.go:545: container init caused: process_linux.go:508: setting cgroup config for procHooks process caused: openat2 /sys/fs/cgroup/kubepods/burstable/podfb1a1616-e10f-4916-9df8-160a92cf4340/194f8be3d70a7141148c63d2dd92c24e47e40af6c0fdb6d582885a60d38d8e62/memory.max: no such file or directory: unknown
      Exit Code:    128
      Started:      Thu, 01 Jan 1970 01:00:00 +0100
      Finished:     Fri, 12 Aug 2022 18:32:26 +0200
    Ready:          False
    Restart Count:  6
    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:  
    Mounts:
      /etc/coredns from config-volume (ro)
      /var/run/secrets/kubernetes.io/serviceaccount from kube-api-access-hs9ph (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
  kube-api-access-hs9ph:
    Type:                    Projected (a volume that contains injected data from multiple sources)
    TokenExpirationSeconds:  3607
    ConfigMapName:           kube-root-ca.crt
    ConfigMapOptional:       
    DownwardAPI:             true
QoS Class:                   Burstable
Node-Selectors:              
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
  ----     ------     ----                    ----               -------
  Normal   Scheduled  4m42s                   default-scheduler  Successfully assigned kube-system/coredns-64c6478b6c-snkxx to raspberrypi4-docker3
  Normal   Pulled     4m41s (x2 over 4m42s)   kubelet            Container image "coredns/coredns:1.8.0" already present on machine
  Normal   Created    4m41s (x2 over 4m42s)   kubelet            Created container coredns
  Warning  Failed     4m41s (x2 over 4m42s)   kubelet            Error: failed to create containerd task: failed to create shim: OCI runtime create failed: container_linux.go:380: starting container process caused: process_linux.go:545: container init caused: process_linux.go:508: setting cgroup config for procHooks process caused: openat2 /sys/fs/cgroup/kubepods/burstable/podfb1a1616-e10f-4916-9df8-160a92cf4340/coredns/memory.max: no such file or directory: unknown
  Warning  BackOff    4m39s (x2 over 4m40s)   kubelet            Back-off restarting failed container
  Normal   Pulled     2m32s (x4 over 3m51s)   kubelet            Container image "coredns/coredns:1.8.0" already present on machine
  Normal   Created    2m32s (x4 over 3m51s)   kubelet            Created container coredns
  Warning  Failed     2m32s (x4 over 3m51s)   kubelet            Error: failed to create containerd task: failed to create shim: OCI runtime create failed: container_linux.go:380: starting container process caused: process_linux.go:545: container init caused: process_linux.go:508: setting cgroup config for procHooks process caused: openat2 /sys/fs/cgroup/kubepods/burstable/podfb1a1616-e10f-4916-9df8-160a92cf4340/coredns/memory.max: no such file or directory: unknown
  Warning  BackOff    2m30s (x13 over 3m51s)  kubelet            Back-off restarting failed container

How can I solve this CrashLoopBackOff problem?

**Tags:** kubernetes


---

## 1 answers

### Answer by username_0 on 2022-08-30. Score: 0 | Accepted answer

I have solved the coredns problem by running
sudo sed -i '$ s/$/ cgroup_enable=cpuset cgroup_enable=memory cgroup_memory=1/' /boot/cmdline.txt

in my raspbian.


---

