<p>I am trying to run a simple image on a specific namespace to debug some issues</p>

<pre><code>kubectl run busy --image busybox --namespace my-local-dev 
deployment.apps/busy created
</code></pre>

<p>However for some reason the container keeps restarting</p>

<pre><code>busy-67b577b945-ng2lt                     0/1       CrashLoopBackOff   5          3m
</code></pre>

<p>and I am unable to get any logs, even with the <code>--previous</code> flag</p>

<pre><code>$ kubectl logs -f --namespace my-local-dev busy-67b577b945-ng2lt --previous
Unable to retrieve container logs for docker://c8b9fce066686b3be01df1ed3343be5ec65607cb203e054fd9365511f77bd4af/home/pkara/Desktop
$ kubectl logs -f --namespace my-local-dev busy-67b577b945-ng2lt
$ _
</code></pre>

<p>Any suggestions?</p>

pkaramol
<p><code>CrashLoopBackOff</code> means that your pod continues on crashing and gets restarted and crashes again.</p>

<p>Depending on the point of crash, for example soon at startup or later during the execution of your app, you may or may not see the logs.</p>

<p>In this case (no logs shown) it's likely that your pod has NOT some requested resources available. It may be a secret or a volume, for example.</p>

<p>A good way is to watch Kubernetes events:  <code>kubectl get events</code></p>

<p>Or in similar way describe your resource and read the relative events:  <code>kubectl describe pod &lt;pod_name&gt;</code>, the last part of the screen is dedicated to events on that resource.</p>
