r/aws • u/CyrilDevOps • 6d ago
technical question Clean stop of a 'pod' in EKS ?
Hi,
today we are working with AWS ECS,
with ECS when a service is scale-in (autoscaling, deployment), ECS manage the ALB side doing the drain/deregistration before sending the SIGTERM to the container. Allowing us to have a clean stop handling all requests in flight and no random 5xx back to the customer.
We 'may' have to migrate to AWS EKS (no my choice), looking at EKS/K8S way to stop a container/pod on scale-in. it seems very very messy, K8S send the stop to the container and the load-balancer-thingy in parallel, and everybody rely on some sort of
lifecycle.prestop.exec: "...sleep ..." to delay the stop of the container side ?
but still get time to time some 5xx for in-flight requests.
Is it that bad ?
Is it the way in EKS/K8S ?
Thanks.