Skip to content

fix: Graceful deployments with EKS and nginx ingress controller

Ghost User requested to merge (removed):master into master

Whenever we use the autodevops to deploy to an eks cluster, we use an nginx ingress controller by default gitlab apps. The deployment is not graceful as when a new pod launches and the old one terminates, the aws load balancer target group takes a couple of seconds to deregister the old pod and register a new pod. This creates split second downtime between the deployments.

Using a deployment lifecycle prestop hook, kubernetes can inform the load balancer that a pod is about to be terminated but doesnt terminate the pod after x amount of seconds (which in most cases can be 10 seconds). This will ensure that load balancer have enough time to deregister and then register new pods.

Edited by Ghost User

Merge request reports