<p>I have a Kubernetes cluster deployed on GCP with a single node, 4 CPU's and 15GB memory. There are a few pods with all the pods bound to the persistent volume by a persistent volume claim. I have observed that the pods have restarted automatically and the data in the persistent volume is lost.</p>

<p>After some research, I suspect that this could be because of the pod eviction policy. When I used kubectl describe pod , I noticed the below error.</p>

<pre><code>0/1 nodes are available: 1 node(s) were not ready, 1 node(s) were out of disk space, 1 node(s) were unschedulable.
</code></pre>

<p>The restart policy of my pods is "always". So I think that the pods have restarted after being resource deprived. </p>

<p>How do I identify the pod eviction policy of my cluster and change it? so that this does not happen in the future</p>

ilegolas
<blockquote>
  <p>pod eviction policy of my cluster and change</p>
</blockquote>

<p>These thresholds ( pod eviction)  are flags of <strong>kubelet</strong>, you can tune these values according to your requirement. you can edit the kubelet config file, here is the detail <a href="https://kubernetes.io/docs/tasks/administer-cluster/kubelet-config-file/#start-a-kubelet-process-configured-via-the-config-file" rel="nofollow noreferrer">config-file</a></p>

<p><a href="https://kubernetes.io/docs/tasks/administer-cluster/reconfigure-kubelet/" rel="nofollow noreferrer">Dynamic Kubelet Configuration</a> allows you to edit these values in the live cluster</p>

<blockquote>
  <p>The restart policy of my pods is "always". So I think that the pods have restarted after being resource deprived.</p>
</blockquote>

<p>Your pod has been <strong>rescheduled</strong> due to node's issue (not enough disk space ).</p>

<blockquote>
  <p>The restart policy of my pods is "always".</p>
</blockquote>

<p>It means if the pod is not up and running then  try to <strong>restart</strong> it . </p>
