0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

How to solve flannel evicted?

Last updated at Posted at 2020-01-10

flannelだけがEvictedで動かない、、、

# kubectl get pods --all-namespaces
NAMESPACE     NAME                              READY   STATUS    RESTARTS   AGE
kube-system   coredns-6955765f44-g9x8l          0/1     Pending   0          19m
kube-system   coredns-6955765f44-wr6zb          0/1     Pending   0          19m
kube-system   etcd-cal                          1/1     Running   0          19m
kube-system   kube-apiserver-calo               1/1     Running   0          19m
kube-system   kube-controller-manager-cal       1/1     Running   0          19m
kube-system   kube-flannel-ds-amd64-s9d7l       0/1     Evicted   0          46s
kube-system   kube-proxy-hsbxf                  1/1     Running   0          19m
kube-system   kube-scheduler-cal                1/1     Running   0          19m

kubectl describe nodeでステータスを確認

# kubectl describe node
Name:           kube-flannel-ds-amd64-cskpw
Namespace:      kube-system
Priority:       0
Node:           cal/
Start Time:     Fri, 10 Jan 2020 23:12:14 +0900
Labels:         app=flannel
                controller-revision-hash=67f65bfbc7
                pod-template-generation=1
                tier=node
Annotations:    <none>
Status:         Failed
Reason:         Evicted
Message:        Pod The node had condition: [DiskPressure].
IP:
IPs:            <none>
Controlled By:  DaemonSet/kube-flannel-ds-amd64
Init Containers:
  install-cni:
    Image:      quay.io/coreos/flannel:v0.11.0-amd64
    Port:       <none>
    Host Port:  <none>
    Command:
      cp
    Args:
      -f
      /etc/kube-flannel/cni-conf.json
      /etc/cni/net.d/10-flannel.conflist
    Environment:  <none>
    Mounts:
      /etc/cni/net.d from cni (rw)
      /etc/kube-flannel/ from flannel-cfg (rw)
      /var/run/secrets/kubernetes.io/serviceaccount from flannel-token-sq5fq (ro)
Containers:
  kube-flannel:
    Image:      quay.io/coreos/flannel:v0.11.0-amd64
    Port:       <none>
    Host Port:  <none>
    Command:
      /opt/bin/flanneld
    Args:
      --ip-masq
      --kube-subnet-mgr
    Limits:
      cpu:     100m
      memory:  50Mi
    Requests:
      cpu:     100m
      memory:  50Mi
    Environment:
      POD_NAME:       kube-flannel-ds-amd64-cskpw (v1:metadata.name)
      POD_NAMESPACE:  kube-system (v1:metadata.namespace)
    Mounts:
      /etc/kube-flannel/ from flannel-cfg (rw)
      /run/flannel from run (rw)
      /var/run/secrets/kubernetes.io/serviceaccount from flannel-token-sq5fq (ro)
Volumes:
  run:
    Type:          HostPath (bare host directory volume)
    Path:          /run/flannel
    HostPathType:
  cni:
    Type:          HostPath (bare host directory volume)
    Path:          /etc/cni/net.d
    HostPathType:
  flannel-cfg:
    Type:      ConfigMap (a volume populated by a ConfigMap)
    Name:      kube-flannel-cfg
    Optional:  false
  flannel-token-sq5fq:
    Type:        Secret (a volume populated by a Secret)
    SecretName:  flannel-token-sq5fq
    Optional:    false
QoS Class:       Guaranteed
Node-Selectors:  <none>
Tolerations:     :NoSchedule
                 node.kubernetes.io/disk-pressure:NoSchedule
                 node.kubernetes.io/memory-pressure:NoSchedule
                 node.kubernetes.io/network-unavailable:NoSchedule
                 node.kubernetes.io/not-ready:NoExecute
                 node.kubernetes.io/pid-pressure:NoSchedule
                 node.kubernetes.io/unreachable:NoExecute
                 node.kubernetes.io/unschedulable:NoSchedule
Events:
  Type     Reason     Age    From               Message
  ----     ------     ----   ----               -------
  Normal   Scheduled  6m29s  default-scheduler  Successfully assigned kube-system/kube-flannel-ds-amd64-cskpw to cal
  Warning  Evicted    6m29s  kubelet, cal   The node had condition: [DiskPressure].

DiskPressure=ディスク容量が足りない

HDDの空き容量を350GBほど確保

# df -h
Filesystem                  Size  Used Avail Use% Mounted on
udev                         16G     0   16G   0% /dev
tmpfs                       3.2G  3.4M  3.2G   1% /run
/dev/sdd2                   1.8T  1.4T  374G  79% /
tmpfs                        16G     0   16G   0% /dev/shm
tmpfs                       5.0M  4.0K  5.0M   1% /run/lock
tmpfs                        16G     0   16G   0% /sys/fs/cgroup

空き容量確保後

# kubectl get pods --all-namespaces
NAMESPACE     NAME                              READY   STATUS    RESTARTS   AGE
kube-system   coredns-6955765f44-g9x8l          1/1     Running   0          19m
kube-system   coredns-6955765f44-wr6zb          1/1     Running   0          19m
kube-system   etcd-cal                          1/1     Running   0          19m
kube-system   kube-apiserver-cal                1/1     Running   0          19m
kube-system   kube-controller-manager-cal       1/1     Running   0          19m
kube-system   kube-flannel-ds-amd64-s9d7l       0/1     Running   0          46s
kube-system   kube-proxy-hsbxf                  1/1     Running   0          19m
kube-system   kube-scheduler-cal                1/1     Running   0          19m
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?