0

I am working with AWS ALB and Kubernetes for the first time and have some questions.

Example, i have a "pod" and running in AWS Kubernetes. Replica is set to "2", so I have two pods running (pod-0 and pod-1).

In the Ingress yml I have set the target-typ to "ip" and target-group-attribute to "stickiness.enabled=true,stickiness.lb_cookie.duration_seconds=300,load_balancing.algorithm.type=least_outstanding_requests,deregistration_delay.timeout_seconds=15".

In the AWS UI I saw that the values are set.

Now to the question :)

From the documentation (https://docs.aws.amazon.com/elasticloadbalancing/latest/application/sticky-sessions.html): "When the load balancer receives a request from a client that contains the cookie, it detects it and routes the request to the same target. If the cookie is present but cannot be decoded, or if it refers to a target that was deregistered or is unhealthy, the load balancer selects a new target and updates the cookie with information about the new target.".

If I kill the "pod-0", then I would expect that the next request would go to "pod-1", but I get a 502 Bad Gateway. After I reload the request, the next request goes to "pod-1".

Does anyone have any idea why this is happening?

Thank you for you help!

TheUnkown
  • 1
  • 1

0 Answers0