<p>I have the following deployment config. The test-worker-health and health endpoints are both unreachable as the application is failing due to an error. The startup probe keeps restarting the container after failing as restartPolicy: Always. The pods enter CrashLoopBackoff state. Is there a way to fail such startup probe?</p>
<pre><code>livenessProbe:
          failureThreshold: 3
          httpGet:
            path: /health
            port: 8080
          periodSeconds: 20
          successThreshold: 1
          timeoutSeconds: 30
startupProbe:
          httpGet:
            path: /test-worker-health
            port: 8080
          failureThreshold: 12
          periodSeconds: 10
</code></pre>

<blockquote>
<p>The startup probe keeps restarting the container after failing</p>
</blockquote>
<p>The startupProbe does not restart your container, but the <em>livenessProbe</em> does.</p>
<blockquote>
<p>The pods enter CrashLoopBackoff state. Is there a way to fail such startup probe?</p>
</blockquote>
<p>If you remove the <em>livenessProbe</em>, you will not get this restart-behavior. You may want to use a <em>readinessProbe</em> instead?</p>
<blockquote>
<p>Is there a way to fail such startup probe?</p>
</blockquote>
<p>What do you mean? It is already &quot;failing&quot; as you say. You want automatic rollback? That is provided by e.g. Canary Deployment, but is a more advanced topic.</p>
