<p>I have a EKS cluster with the <a href="https://github.com/kubernetes-sigs/aws-alb-ingress-controller/" rel="nofollow noreferrer">aws-alb-ingress-controller</a> controlling the setup of the AWS ALB pointing to the EKS cluster. </p>

<p>After a rolling update of one of the deployments, the application failed, causing the <code>Pod</code> to never start (The pod is stuck in status <code>CrashLoopBackOff</code>). However the previous version of the <code>Pod</code> is still running. But it seems like the status of the service is still unhealthy:</p>

<p><a href="https://i.stack.imgur.com/b12DN.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/b12DN.png" alt="enter image description here"></a></p>

<p>This means now all traffic is redirected to the default backend, a different service. In this case in Kubernetes the related service for the deployment is of type <code>NodePort</code>:</p>

<pre><code>Type:                     NodePort
IP:                       172.20.186.130
Port:                     http-service  80/TCP
TargetPort:               5000/TCP
NodePort:                 http-service  31692/TCP
Endpoints:                10.0.3.55:5000
</code></pre>

<p>What is causing the endpoint to become unhealthy? I expected it to just redirect traffic to the old version of the <code>Pod</code> that is still running. Is there any way were I can ensure that the endpoint remains healthy?</p>

Blokje5
<p>The problem was that while in Kubernetes the application was healthy, the ALB load-balancer performed it's own health check. This health check was configured by default to expect a <code>200</code> response from the <code>/</code> endpoint, however for this specific application it did not return a <code>200</code> response on that endpoint. </p>

<p>Since the ALB is controlled by the alb-ingress-controller, I added an annotation on my ingress to configure the correct path: <code>alb.ingress.kubernetes.io/healthcheck-path:  /health</code>. Since we are working with Spring Microservices this endpoint works for all our applications.</p>
