<p>Running on Kubernetes v1.20</p>
<p>I have a startup probe configured and a liveness probe. On the first start of the container, the startup probe is executed until the liveness probe takes over (as documented). However, it seems if the liveness probe fails and the container restarts, the startup probe is not executed again. Is this intended behavior? I cannot find this documented anywhere.</p>
<p>To reproduce this issue, I'm running the following container definition (relevant parts only):</p>
<pre><code>containers:
      - args:
        - /bin/sh
        - -c
        - touch /tmp/alive; sleep 10000
        image: busybox
        livenessProbe:
          exec:
            command:
            - /bin/sh
            - -c
            - touch /tmp/liveness; test -f /tmp/alive
          failureThreshold: 3
          initialDelaySeconds: 10
          periodSeconds: 2
          successThreshold: 1
          timeoutSeconds: 2
        startupProbe:
          exec:
            command:
            - touch
            - /tmp/startup
          failureThreshold: 3
          periodSeconds: 2
          successThreshold: 1
          timeoutSeconds: 2
</code></pre>
<p>So if the liveness probe runs, it creates /tmp/liveness. If the startup probe runs, it creates /tmp/startup. You can simulate the liveness check failing by deleting /tmp/alive.</p>
<p>On first startup:</p>
<pre><code>$ ls /tmp/
alive     liveness  startup
</code></pre>
<p>After <code>rm /tmp/alive</code>, the liveness check fails and the container is restarted. Then, in the new container:</p>
<pre><code>$ ls /tmp/
alive     liveness
</code></pre>
<p>So it seems the startup probe is not executed anymore.</p>

<p>Might want to check if your K8 version is the one affected by this issue:</p>
<p><a href="https://github.com/kubernetes/kubernetes/issues/101064" rel="nofollow noreferrer">https://github.com/kubernetes/kubernetes/issues/101064</a></p>
<p>or</p>
<p><a href="https://github.com/kubernetes/kubernetes/issues/102230" rel="nofollow noreferrer">https://github.com/kubernetes/kubernetes/issues/102230</a></p>
