<p>Everytime I make a new deployment of my app, my nodes start reporting <code>nodeHasDiskPressure</code> . After around 10 minutes or so the node goes back to a normal state. I found this SO answer regarding setting thresholds: <a href="https://stackoverflow.com/questions/42576661/diskpressure-crashing-the-node">DiskPressure crashing the node</a> </p>

<p>.. but I am not sure how to actually set these thresholds on Google Kubernetes Engine </p>

<p>The kubelet option you mentioned can be added to you cluster "instance-template"</p>

<p>Make a copy of the instance-template that has been used for your cluster (instance-group) after clicked on copy before to save you can make some changes at the instance template,you can add those flags into : Instance-template --> Custom metadata--> kube-env </p>

<p>The flag will be added in this way; </p>

<h2>KUBELET_TEST_ARGS: --image-gc-high-threshold=[your value] KUBELET_TEST_ARGS: --low-diskspace-threshold-mb=[your value] KUBELET_TEST_ARGS: --image-gc-low-threshold=[your value]</h2>

<p>Once you set your values,save the instance template then edit the instance group of your cluster by changing the instance-template from the default to your custom one, once done it hit "rolling restart/replace" on your Dashboard on the instance group main page. This will restart your instances of your cluster with the new values.</p>
