<p>Apply the following YAML file into a Kubernetes cluster:</p>
<pre><code>apiVersion: v1
kind: Pod
metadata:
  name: freebox
spec:
  containers:
  - name: busybox
    image: busybox:latest
    imagePullPolicy: IfNotPresent
</code></pre>
<p>Could the status be &quot;Running&quot; if I run <code>kubectl get pod freebox</code>? Why?</p>

qqwenwenti
<p>If formatting errors are ignored , no pod wont be in running status :</p>
<pre><code>controlplane $ kubectl get pods freebox
NAME      READY   STATUS             RESTARTS   AGE
freebox   0/1     CrashLoopBackOff   3          81s
</code></pre>
<p>Becuase if you look at Dockerfile of busy box , The CMD argument &quot;sh&quot; which will complete immediately so pod gets restarted ( becuase default restart policy is always')</p>
<pre><code>https://hub.docker.com/layers/busybox/library/busybox/latest/images/sha256-bc02457f8f5a4a3cd931028ec76c7468cfa8b44d7d89c4a91df1fd82285da681?context=explore

ADD file ... in /708.51 KB
CMD [&quot;sh&quot;]

</code></pre>
<p>see the describe of the pod as following :</p>
<pre><code>Events:
  Type     Reason     Age              From               Message
  ----     ------     ----             ----               -------
  Normal   Scheduled  8s               default-scheduler  Successfully assigned default/freebox to node01
  Normal   Pulled     7s (x2 over 8s)  kubelet, node01    Container image &quot;busybox:latest&quot; already present on machine
  Normal   Created    6s (x2 over 7s)  kubelet, node01    Created container busybox
  Normal   Started    6s (x2 over 7s)  kubelet, node01    Started container busybox
  Warning  BackOff    5s (x2 over 6s)  kubelet, node01    Back-off restarting failed container

</code></pre>
