Although the questions believes that the readinessProbe will say not ready, however the reply after checking the curl says I am ready everytime. Do check.
How long did you wait in Q4 and Q5? If you started checking immediately, then simple-webapp-2 will not be ready, and you will get “Failed” when the script tries its /ready end point; simple-webapp-1 will return successfully. After about 80 seconts, then simple-webapp-2 will return successfully as well.
The point of Q6 is that now you’ve added a readinessProbe to simple-webapp-2, and you’ve recreated the pod. Now the updated pod is no longer in a Ready state for the first 80 seconds due to the readinessProbe, and if you look at the output, you’ll see that only simple-webapp-1 responds – there are no Fails any more. After 80 seconds, simple-webapp-2 starts responding, but it’s already successful.
If one looks at question no 8, which is in the same series although the readinessProbe still shows as failed as in attachment
What do you have for the readinessProbe block of your YAML? It looks like the endpoint is simply not responding.