<p>I'm using K8S <code>1.14</code> and Helm <code>3.3.1</code>.</p>
<p>I have an app which <strong>works when deployed without probes</strong>. Then I set two trivial probes:</p>
<pre class="lang-yaml prettyprint-override"><code>          livenessProbe:
            exec:
              command:
                - ls
                - /mnt
            initialDelaySeconds: 5
            periodSeconds: 5

          readinessProbe:
            exec:
              command:
                - ls
                - /mnt
            initialDelaySeconds: 5
            periodSeconds: 5
</code></pre>
<p>When I deploy via <code>helm upgrade</code>, the command eventually (~5 mins) fails with:</p>
<pre><code>Error: UPGRADE FAILED: release my-app failed, and has been rolled back due to atomic being set: timed out waiting for the condition
</code></pre>
<p>But in the events log there is no trace of any probe:</p>
<pre><code>5m21s       Normal    ScalingReplicaSet         deployment/my-app     Scaled up replica set my-app-7 to 1
5m21s       Normal    Scheduled                 pod/my-app-7-6        Successfully assigned default/my-app-7-6 to gke-foo-testing-foo-testing-node-po-111-r0cu
5m21s       Normal    LoadBalancerNegNotReady   pod/my-app-7-6        Waiting for pod to become healthy in at least one of the NEG(s): [k8s1-222-default-my-app-80-54]
5m21s       Normal    SuccessfulCreate          replicaset/my-app-7   Created pod: my-app-7-6
5m20s       Normal    Pulling                   pod/my-app-7-6        Pulling image &quot;my-registry/my-app:v0.1&quot;
5m20s       Normal    Pulled                    pod/my-app-7-6        Successfully pulled image &quot;my-registry/my-app:v0.1&quot;
5m20s       Normal    Created                   pod/my-app-7-6        Created container my-app
5m20s       Normal    Started                   pod/my-app-7-6        Started container my-app
5m15s       Normal    Attach                    service/my-app        Attach 1 network endpoint(s) (NEG &quot;k8s1-222-default-my-app-80-54&quot; in zone &quot;europe-west3-a&quot;)
19s         Normal    ScalingReplicaSet         deployment/my-app     Scaled down replica set my-app-7 to 0
19s         Normal    SuccessfulDelete          replicaset/my-app-7   Deleted pod: my-app-7-6
19s         Normal    Killing                   pod/my-app-7-6        Stopping container my-app

</code></pre>
<p>Hence the question: what are the probes doing and where?</p>

<p>I don't if you image include bash, but if you just want to verify if the directory exists, you can do the samething using others shell commands, try this:</p>
<pre><code>          livenessProbe:
            exec:
              command:
                - /bin/bash
                - -c
                - ls /mnt
            initialDelaySeconds: 5
            periodSeconds: 5

          readinessProbe:
            exec:
              command:
                - /bin/bash
                - -c
                - ls /mnt
            initialDelaySeconds: 5
            periodSeconds: 5
</code></pre>
<p>In bash you can also try to use the <code>test</code> built-in function:</p>
<p><code>[[ -d /mnt ]]</code> = The <code>-d</code> verify if the directory <code>/mnt</code> exists.</p>
<p>As an alternative, there is also the command <code>stat</code>:</p>
<p><code>stat /mnt</code></p>
<p>If you want to check if the directory has any specific file, use the complete path with filename include.</p>
