<p>I describe the pod. I found the error message. It seems the pod Readiness probe is failed. But I check the endpoint, the endpoint doesn't remove the pod IP. The pod receive traffic, even the liveness probe is failed.  </p>

<pre><code>  Warning  Unhealthy  92s (x84 over 3d1h)  kubelet, aks-agentpool-xxxxx Readiness probe failed: Get https://10.244.14.21:5001/api/alive: net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)
</code></pre>

<pre><code>$ kubectl describe ep myapp
Name:         myapp
Namespace:    default
Labels:       &lt;none&gt;
Annotations:  &lt;none&gt;
Subsets:
  Addresses:          10.244.14.21,10.244.24.34
  NotReadyAddresses:  &lt;none&gt;
  Ports:
    Name    Port  Protocol
    ----    ----  --------
    legacy  5001  TCP
    https   5001  TCP

Events:  &lt;none&gt;

</code></pre>

<p>I want to know what if readiness failed?</p>

Ruoxuan.Wang
<h1>Practice</h1>

<blockquote>
  <p>It seems the pod Readiness probe is failed. But I check the endpoint, the endpoint doesn't remove the pod IP.</p>
</blockquote>

<p>The Pod is healthy at the time you are checking it and the Warning you see is just saying that there were situations when Readiness probe failed for it.</p>

<p>Please note that if the readiness probe fails, the endpoints controller removes the Pod’s IP address from the endpoints of all Services that match the Pod (they are added back upon Readiness probe success).</p>

<p>You can check that with 
<code>$ kubectl describe svc/YOUR_SERVICE</code> .</p>

<p>It'll output the list of EndPoints (EPs) that serve traffic for that service at a time you executed command.</p>

<p>If the EP readiness probe fails, EP won't be listed in the output of that command.</p>

<p>From the output you have provided:</p>

<pre><code>$ kubectl describe ep myapp
...
Subsets:
  Addresses:          10.244.14.21,10.244.24.34
  NotReadyAddresses:  &lt;none&gt;
</code></pre>

<p>we can say that all the EPs are ready at the moment.</p>

<h1>Theory</h1>

<blockquote>
  <p>I want to know what if readiness failed?</p>
</blockquote>

<p>In short: traffic will be redirected to other EPs untill this EP is ready again.</p>

<p>Official documentation on <a href="https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/" rel="nofollow noreferrer">Readiness probe</a> says that:</p>

<p>A <a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.17/#probe-v1-core" rel="nofollow noreferrer">Probe</a> is a diagnostic performed <strong>periodically</strong> by the <a href="https://kubernetes.io/docs/admin/kubelet/" rel="nofollow noreferrer">kubelet</a> on a Container. To perform a diagnostic, the kubelet calls a <a href="https://godoc.org/k8s.io/kubernetes/pkg/api/v1#Handler" rel="nofollow noreferrer">Handler</a> implemented by the Container. </p>

<p>The kubelet can optionally perform and react to three kinds of probes on running Containers:
- livenessProbe
- readinessProbe
- startupProbe</p>

<p><code>readinessProbe</code>: Indicates whether the Container is ready to service requests. <strong>If the readiness probe fails</strong>, the endpoints controller <strong>removes the Pod’s IP address from the endpoints</strong> of all Services that match the Pod. The default state of readiness before the initial delay is <code>Failure</code>. If a Container does not provide a readiness probe, the default state is <code>Success</code>.</p>

<p>Hope that is exactly the info you have been looking for.</p>
