<p>ref:<a href="https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/" rel="nofollow noreferrer">https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/</a></p>
<p>but the cmd result is(pod:two-containers status is NotReady ):</p>
<pre><code>[root@devnet-master ~]# kubectl get pods
NAME                             READY   STATUS     RESTARTS   AGE
busybox-1                        1/1     Running    1          33d
local-volume-provisioner-k49c7   1/1     Running    0          29m
nginx                            2/2     Running    1          21m
two-containers                   1/2     NotReady   0          61m
</code></pre>
<p>the version is:</p>
<pre><code>[root@devnet-master ~]# kubectl version
Client Version: version.Info{Major:&quot;1&quot;, Minor:&quot;21&quot;, GitVersion:&quot;v1.21.1&quot;, GitCommit:&quot;5e58841cce77d4bc13713ad2b91fa0d961e69192&quot;, GitTreeState:&quot;clean&quot;, BuildDate:&quot;2021-05-12T14:18:45Z&quot;, GoVersion:&quot;go1.16.4&quot;, Compiler:&quot;gc&quot;, Platform:&quot;linux/amd64&quot;}
Server Version: version.Info{Major:&quot;1&quot;, Minor:&quot;21&quot;, GitVersion:&quot;v1.21.1&quot;, GitCommit:&quot;5e58841cce77d4bc13713ad2b91fa0d961e69192&quot;, GitTreeState:&quot;clean&quot;, BuildDate:&quot;2021-05-12T14:12:29Z&quot;, GoVersion:&quot;go1.16.4&quot;, Compiler:&quot;gc&quot;, Platform:&quot;linux/amd64&quot;}

</code></pre>
<p>describe pod result is :
<a href="https://i.stack.imgur.com/yX8tO.png" rel="nofollow noreferrer">exec describe pod result image</a></p>
<p>apply yaml is:
<a href="https://i.stack.imgur.com/zS8WF.png" rel="nofollow noreferrer">apply yaml image</a></p>
<pre><code>apiVersion: v1
kind: Pod
metadata:
  name: two-containers
spec:
  restartPolicy: Never
  volumes:
  - name: shared-data
    hostPath:      
      path: /data
  containers:
  - name: nginx-container
    image: xxxxxx/nginx:1.0
    volumeMounts:
    - name: shared-data
      mountPath: /usr/share/nginx/html
  - name: debian-container
    image: xxxxxx/debian:stable
    volumeMounts:
    - name: shared-data
      mountPath: /pod-data
    command: [&quot;/bin/sh&quot;]
    args: [&quot;-c&quot;, &quot;echo Hello from the debian container &gt; /pod-data/index.html&quot;]

</code></pre>

neokeeper
<ul>
<li>Pod is being shown in ready status because as per the screenshot you have
provided it is a multi container pod. Second container naemd &quot;debian-
container&quot; is in &quot;completed&quot; state because it just had to execute a echo
command. I suspect you have set the restartPolicy as Onfailure or Never so
the pod is not restarting. But one of the container inside the pod is in
running state but the other is not. Hence pod status is in &quot;NotReady&quot;</li>
<li>&quot;1/2&quot; under &quot;Ready&quot; column in <code>kubectl get pods</code> also indicates the
same that only container is in ready state out of two.</li>
</ul>
