Source: Dev.to | Jan 23, 2026 (UTC)
While deploying applications on Azure Kubernetes Service (AKS) behind Azure Application Gateway Ingress Controller (AGIC), I repeatedly faced brief but noticeable downtime during deployments.
The issue was not with Kubernetes itself, but with how AGIC updates backend pool IPs when pods are replaced during a deployment.
By default, during a rollout:
- Old pods are terminated
- New pods come up with new IPs
- AGIC takes around 30 seconds (sometimes more) to detect and update these new pod IPs in Application Gateway
During this window, Application Gateway may still route traffic to terminating pods → resulting in 5xx errors or downtime.
Let’s understand what was happening internally:
- Kubernetes starts terminating old pods
- Pods are removed from Endpoints
- AGIC needs time to:
- Detect endpoint changes
- Update Application Gateway backend pool
- Push config updates
- Meanwhile, traffic is still flowing
If pods terminate too fast, Application Gateway temporarily has no healthy backend, causing downtime.
After digging into this and testing a few approaches in production, I implemented three small but very effective changes in my Deployment YAML:
strategy: type: RollingUpdate rollingUpdate: maxSurge: 1 maxUnavailable: 0
Enter fullscreen mode
Exit fullscreen mode


Залишити відповідь