0/1 nodes are available 1 node(s) had diskpressure

9/10/2018

I am trying to schedule a pod on my local microk8s cluster. in the events section i see a warning 0/1 nodes are available 1 node(s) had diskpressure how to check how much space node has and how to set a bigger value ..

-- invariant
kubernetes

1 Answer

9/10/2018

Here are the parameters you can set as per the threshold limits you want to set :

systemctl status kubelet
â— kubelet.service - kubelet: The Kubernetes Node Agent
   Loaded: loaded (/etc/systemd/system/kubelet.service; enabled; vendor preset: disabled)
  Drop-In: /etc/systemd/system/kubelet.service.d
           └─10-kubeadm.conf
   Active: active (running) since Fri 2018-08-17 15:54:28 IST; 3 weeks 2 days ago
     Docs: http://kubernetes.io/docs/
 Main PID: 580 (kubelet)
    Tasks: 78
   Memory: 88.5M
   CGroup: /system.slice/kubelet.service
           └─580 /usr/bin/kubelet --bootstrap-kubeconfig=/etc/kubernetes/bootstrap-kubelet.conf --kubeconfig=/etc/kubernetes/kubelet.conf --pod-manifest-path=/etc/k...

Pick up the the loaded /etc/systemd/system/kubelet.service file and modify the content like this :

vi /etc/systemd/system/kubelet.service

[Unit]
Description=kubelet: The Kubernetes Node Agent
Documentation=http://kubernetes.io/docs/

[Service]
ExecStart=/usr/bin/kubelet --eviction-hard nodefs.available<1Gi --eviction-soft nodefs.available<1Gi
Restart=always
StartLimitInterval=0
RestartSec=10

[Install]
WantedBy=multi-user.target

Here --eviction-hard and --eviction-soft is the parameters you can set as per your requirements, For more details on how to set up these parameters refer this official documents: https://kubernetes.io/docs/tasks/administer-cluster/out-of-resource/

Hope this help,

Thank you!

-- chintan thakar
Source: StackOverflow