<p>I have a deployment that fails within one second. And the logs are destroyed as the deployment does a rollback.</p>
<p>Is there anything similar to <code>logs -f</code> that works <em>before</em> a deployment have started and wait until it starts?</p>

gabriel
<p>Check previous logs with <code>kubectl logs -p &lt;pod-name&gt;</code> to spot application issues.</p>
<p>Also, check the exit code of your container with:</p>
<p><code>kubectl describe pod &lt;pod-name&gt; | grep &quot;Exit Code&quot;</code></p>
<p>Finally, if it is a scheduling problem, check out the event log of the corresponding ReplicaSet:</p>
<p><code>kubectl describe replicaset &lt;name-of-deployment&gt;</code></p>
