<p>In my kubernetes cluster, master nodes have often DiskPressure problem due to /var partition usage.
I noticed that the /var/lib/kubelet folder takes up a lot of space and I was going to change this folder as a kubelet overlay pointing to one in a larger partition.
I've already done this with docker and etcd, but I can't figure out how to do this change of kubelet pointing, has anyone done it yet?</p>

<p>Here is the <a href="https://kubernetes.io/docs/reference/command-line-tools-reference/kubelet/" rel="nofollow noreferrer">documentation</a> of kubelet flags. In that page search for <code>root-dir</code> <br/></p>

<p>if you are using CentOs system then follow below:</p>

<p>Step 1.a: edit (for older k8s version) /etc/systemd/system/kubelet.service.d/10-kubeadm.conf as shown over <a href="https://stackoverflow.com/a/46065250/4451944">here</a> <br/>
Step 1.b: edit (for newer k8s version) /etc/sysconfig/kubelet as shown over <a href="https://stackoverflow.com/a/53228571/4451944">here</a><br/>
Step 2: <br/><code>systemctl daemon-reload</code><br/>
<code>systemctl restart kubelet</code></p>

<p>Explanation: <code>--root-dir</code> flag is what you need to specify your new directory. This flag needs to mentioned as an <em>extra args</em> in the kubelet drop-in file but the structure of the drop-in file changed in the new kubelet versions as shown in step 1.a and 1.b. </p>
