coredns / deployment

Scripts, utilities, and examples for deploying CoreDNS.
Apache License 2.0
549 stars 535 forks source link

open /var/lib/kubernetes/ca.pem: no such file or directory #262

Closed groschi24 closed 2 years ago

groschi24 commented 2 years ago

New Setup of kubeadm

kubectl -n kube-system describe pod coredns-85c6ff46d-jwp82

Name:                 coredns-85c6ff46d-jwp82
Namespace:            kube-system
Priority:             2000000000
Priority Class Name:  system-cluster-critical
Node:                 wcvr-c-00000303/10.15.255.254
Start Time:           Thu, 06 Jan 2022 20:22:59 +0000
Labels:               k8s-app=kube-dns
                      pod-template-hash=85c6ff46d
Annotations:          kubectl.kubernetes.io/restartedAt: 2022-01-06T20:22:59Z
Status:               Pending
IP:
IPs:                  <none>
Controlled By:        ReplicaSet/coredns-85c6ff46d
Containers:
  coredns:
    Container ID:
    Image:         k8s.gcr.io/coredns/coredns:v1.8.6
    Image ID:
    Ports:         53/UDP, 53/TCP, 9153/TCP
    Host Ports:    0/UDP, 0/TCP, 0/TCP
    Args:
      -conf
      /etc/coredns/Corefile
    State:          Waiting
      Reason:       ContainerCreating
    Ready:          False
    Restart Count:  0
    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:  <none>
    Mounts:
      /etc/coredns from config-volume (ro)
      /var/run/secrets/kubernetes.io/serviceaccount from kube-api-access-xd7zf (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-xd7zf:
    Type:                    Projected (a volume that contains injected data from multiple sources)
    TokenExpirationSeconds:  3607
    ConfigMapName:           kube-root-ca.crt
    ConfigMapOptional:       <nil>
    DownwardAPI:             true
QoS Class:                   Burstable
Node-Selectors:              kubernetes.io/os=linux
Tolerations:                 CriticalAddonsOnly op=Exists
                             node-role.kubernetes.io/control-plane:NoSchedule
                             node-role.kubernetes.io/master:NoSchedule
                             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               3m19s                default-scheduler  Successfully assigned kube-system/coredns-85c6ff46d-jwp82 to wcvr-c-00000303
  Warning  FailedCreatePodSandBox  3m18s                kubelet            Failed to create pod sandbox: rpc error: code = Unknown desc = [failed to set up sandbox container "836692809d906c974c2eb531c2e0120abc5a7441e7fb52e816d68687295836fd" network for pod "coredns-85c6ff46d-jwp82": networkPlugin cni failed to set up pod "coredns-85c6ff46d-jwp82_kube-system" network: could not initialize etcdv3 client: open /var/lib/kubernetes/ca.pem: no such file or directory, failed to clean up sandbox container "836692809d906c974c2eb531c2e0120abc5a7441e7fb52e816d68687295836fd" network for pod "coredns-85c6ff46d-jwp82": networkPlugin cni failed to teardown pod "coredns-85c6ff46d-jwp82_kube-system" network: invalid version "": the version is empty]
  Normal   SandboxChanged          5s (x16 over 3m17s)  kubelet            Pod sandbox changed, it will be killed and re-created.
chrisohaver commented 2 years ago

Please ask this in kubeadm channels.