<p>I build a k8s cluster on my virtual Machines(CentOS/7) with Virtual Box:</p>
<pre><code>kubectl get nodes -o wide

NAME           STATUS   ROLES                  AGE   VERSION   INTERNAL-IP     EXTERNAL-IP   OS-IMAGE                KERNEL-VERSION                CONTAINER-RUNTIME
k8s-master     Ready    control-plane,master   8d    v1.21.2   192.168.0.186   &lt;none&gt;        CentOS Linux 7 (Core)   3.10.0-1160.31.1.el7.x86_64   docker://20.10.7
k8s-worker01   Ready    &lt;none&gt;                 8d    v1.21.2   192.168.0.187   &lt;none&gt;        CentOS Linux 7 (Core)   3.10.0-1160.31.1.el7.x86_64   docker://20.10.7
k8s-worker02   Ready    &lt;none&gt;                 8d    v1.21.2   192.168.0.188   &lt;none&gt;        CentOS Linux 7 (Core)   3.10.0-1160.31.1.el7.x86_64   docker://20.10.7
</code></pre>
<p>And i run some pods on the default namespace with a ReplicaSet several days before.<br />
They were all worked fine at first, and then I shut down the VM.<br />
Today, after I restarted the VMs, I found that they are not working properly anymore:</p>
<pre><code>kubectl get all
NAME               READY   STATUS    RESTARTS   AGE
pod/dnsutils       1/1     Running   3          5d13h
pod/kubapp-6qbfz   0/1     Running   0          5d13h
pod/kubapp-d887h   0/1     Running   0          5d13h
pod/kubapp-z6nw7   0/1     Running   0          5d13h

NAME                     DESIRED   CURRENT   READY   AGE
replicaset.apps/kubapp   3         3         0       5d13h
</code></pre>
<p>Then I delete the ReplicaSet and re-create it to create the pods.<br />
And i run the command to get more infomations:</p>
<pre><code>[root@k8s-master ch04]# kubectl describe po kubapp-z887v 
Name:         kubapp-d887h
Namespace:    default
Priority:     0
Node:         k8s-worker02/192.168.0.188
Start Time:   Fri, 23 Jul 2021 15:55:16 +0000
Labels:       app=kubapp
Annotations:  cni.projectcalico.org/podIP: 10.244.69.244/32
              cni.projectcalico.org/podIPs: 10.244.69.244/32
Status:       Running
IP:           10.244.69.244
IPs:
  IP:           10.244.69.244
Controlled By:  ReplicaSet/kubapp
Containers:
  kubapp:
    Container ID:   docker://fc352ce4c6a826f2cf108f9bb9a335e3572509fd5ae2002c116e2b080df5ee10
    Image:          evalle/kubapp
    Image ID:       docker-pullable://evalle/kubapp@sha256:560c9c50b1d894cf79ac472a9925dc795b116b9481ec40d142b928a0e3995f4c
    Port:           &lt;none&gt;
    Host Port:      &lt;none&gt;
    State:          Running
      Started:      Fri, 23 Jul 2021 15:55:21 +0000
    Ready:          False
    Restart Count:  0
    Readiness:      exec [ls /var/ready] delay=0s timeout=1s period=10s #success=1 #failure=3
    Environment:    &lt;none&gt;
    Mounts:
      /var/run/secrets/kubernetes.io/serviceaccount from kube-api-access-m9rwr (ro)
Conditions:
  Type              Status
  Initialized       True 
  Ready             False 
  ContainersReady   False 
  PodScheduled      True 
Volumes:
  kube-api-access-m9rwr:
    Type:                    Projected (a volume that contains injected data from multiple sources)
    TokenExpirationSeconds:  3607
    ConfigMapName:           kube-root-ca.crt
    ConfigMapOptional:       &lt;nil&gt;
    DownwardAPI:             true
QoS Class:                   BestEffort
Node-Selectors:              &lt;none&gt;
Tolerations:                 node.kubernetes.io/not-ready:NoExecute op=Exists for 300s
                             node.kubernetes.io/unreachable:NoExecute op=Exists for 300s
Events:
  Type     Reason     Age                  From               Message
  ----     ------     ----                 ----               -------
  Normal   Scheduled  30m                  default-scheduler  Successfully assigned default/kubapp-d887h to k8s-worker02
  Normal   Pulling    30m                  kubelet            Pulling image &quot;evalle/kubapp&quot;
  Normal   Pulled     30m                  kubelet            Successfully pulled image &quot;evalle/kubapp&quot; in 4.049160061s
  Normal   Created    30m                  kubelet            Created container kubapp
  Normal   Started    30m                  kubelet            Started container kubapp
  Warning  Unhealthy  11s (x182 over 30m)  kubelet            Readiness probe failed: ls: cannot access /var/ready: No such file or directory
</code></pre>
<p>I don`t know what it happens and how i should do for fix it.<br />
SO here i am and ask to you guys for help.<br />
I am a k8s newbie,just give a hand please.</p>
<hr />
<hr />
<p>Thanks for paul-becotte`s help and recommendation.I think i should to post the definition of the pod:</p>
<pre><code>apiVersion: apps/v1
kind: ReplicaSet
metadata:
  # here is the name of the replication controller (RC)
  name: kubapp
spec:
  replicas: 3
  # what pods the RC is operating on
  selector:
    matchLabels:
      app: kubapp
  # the pod template for creating new pods
  template:
    metadata:
      labels:
        app: kubapp
    spec:
      containers:
      - name: kubapp
        image: evalle/kubapp
        readinessProbe:
         exec:
          command:
           - ls
           - /var/ready
</code></pre>
<p>There is a example definition of yaml from <a href="https://github.com/Evalle/k8s-in-action/blob/master/Chapter_4/kubapp-rs.yaml" rel="nofollow noreferrer">https://github.com/Evalle/k8s-in-action/blob/master/Chapter_4/kubapp-rs.yaml</a>.<br />
I don`t know where to find the dockerfile of the image evalle/kubapp.<br />
And I don't know if it has the /var/ready directory.</p>

Winster Handsome
<p>Look at your event</p>
<blockquote>
<p>Warning  Unhealthy  11s (x182 over 30m)  kubelet            Readiness probe failed: ls: cannot access /var/ready: No such file or directory</p>
</blockquote>
<p>Your readiness probe is failing- looks like it is checking for the existence of a file at <code>/var/ready</code>.</p>
<p>Your next step is &quot;does that make sense? Is my container going to actually write a file at /var/ready when its ready?&quot; If so, you'll want to look at the logs from your pod and figure out why its not writing the file. If its NOT the correct check, look at the yaml you used to create your pod/deployment/replicaset whatever and replace that check with something that does make sense.</p>
