gateway
gateway copied to clipboard
Zero downtime with AWS NLB/ALB
Description:
To achieve zero downtime deploys with AWS NLB/ALB, it's required to include a sleep preStop
- https://aws.github.io/aws-eks-best-practices/networking/loadbalancing/loadbalancing/#ensure-pods-are-deregistered-from-load-balancers-before-termination
Seems like the best place is to include the sleep in the shutdown manager lifecycle hook, something like this
lifecycle:
preStop:
exec:
command:
- /bin/sh
- -c
- "sleep 180 && envoy-gateway envoy shutdown"
However, this isn't possible as the docker image doesn't include the sleep command.
An alternative would be to include a --delay
argument, something like envoy gateway shutdown --delay 180s
.