An Azure service that provides serverless Kubernetes, an integrated continuous integration and continuous delivery experience, and enterprise-grade security and governance.
Hello @cargobuddy ,
Apologies for the delayed response.
The path is reverting to the default routing because the Application Gateway Ingress Controller (AGIC) continuously enforces the configuration defined in the Kubernetes Ingress resources.
When application changes are deployed through the Azure DevOps pipeline, the pipeline reapplies or updates the Kubernetes Ingress configuration. AGIC then reconciles the Application Gateway to ensure it exactly matches the state defined in the Ingress manifest.
If the updated deployment:
- Does not include the same path-based routing rules, or
- Recreates or modifies the Ingress resource,
AGIC removes the existing path rules and falls back to the default backend configuration. As a result, traffic may be routed incorrectly, leading to HTTP 502 errors.
This behavior is expected and is by design when using AGIC.
This happens specifically during pipeline deployments:
- AGIC treats Kubernetes as the single source of truth.
- Any manual changes made directly on the Application Gateway are overwritten.
- Each pipeline run reapplies and enforces the Ingress YAML configuration.
- Missing or modified path-based rules during deployment cause AGIC to reset routing to the default configuration.
To prevent this from occurring:
- Ensure all required path-based routing rules are explicitly defined in the Kubernetes Ingress YAML.
- Maintain a consistent Ingress resource name across deployments.
- Avoid making manual changes directly to the Application Gateway.
- Verify that health probe paths align with the application endpoints.
If these conditions are met, routing will remain stable across deployments.
Traffic routing continues to work during application changes as long as the Kubernetes Ingress always defines the full path‑based routing configuration. Any routing reset happens because routing rules were not included in the deployment, not because deployments themselves are unsupported.
- Always deploy a complete Ingress definition
- Keep the Ingress name unchanged
AGIC does not retain or preserve previously configured routing rules. Instead, it reconstructs the routing configuration strictly based on the current Kubernetes Ingress YAML.
- If all required paths are defined in the Ingress YAML, routing functions as expected.
- If any paths are missing, AGIC defaults to the fallback backend configuration, which can result in HTTP 502 errors.
I hope this is helpful! Do not hesitate to let me know if you have any other questions or clarifications.