AGIC Removes Custom Error Pages on Listeners.

Sharma, Sunil 0 Reputation points
2025-01-18T11:06:59.4466667+00:00

I have custom error pages applied to listeners in App Gateway. AGIC seems to be removing these any time it performs an update to the AGW. Is there a way I can define the custom error pages as part of the ingress resource or any other way to keep it persisted?

To Reproduce
Set custom error pages on listeners for 403 and 502 errors.

Perform a kubernetes deploy.

Observe the listeners no longer have custom error pages applied.

Azure Kubernetes Service (AKS)
Azure Kubernetes Service (AKS)
An Azure service that provides serverless Kubernetes, an integrated continuous integration and continuous delivery experience, and enterprise-grade security and governance.
2,236 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Nikhil Duserla 3,960 Reputation points Microsoft Vendor
    2025-01-20T13:16:37.2+00:00

    Hi @Sharma, Sunil,

    Welcome to the Microsoft Q&A Platform! Thank you for asking your question here.

    In Azure Kubernetes Service (AKS), custom error pages set up in Azure Application Gateway may be removed during updates by the Application Gateway Ingress Controller (AGIC). This happens because there's no simple way to define custom error pages directly within the Ingress resource.

    To solve this, you can create a script that reapplies the custom error page settings after each deployment. The script can be run manually or integrated into your CI/CD pipeline, ensuring that the custom error pages are consistently restored after any changes to the Ingress resources.

    If you have any further queries, do let us know.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.