Redirect traffic to Azure Blob Storage via AGIC

Bahlul Guliyev 0 Reputation points
2026-06-11T07:45:12.0033333+00:00

Hello,

We have use case that we need to redirect traffic to Azure Blog Storage via using AGIC. Down below is current design which i want to achieve. But I have found following limitation for this issue. Is there any update on that?

I cannot add the Storage Account endpoint as a backend target in Application Gateway, because:

My App Gateway is managed by AGIC

AGIC fully controls backend pools, listeners, and routing rules

  • Any manual backend I add (including Storage Account) will be overwritten or deleted by AGIC during reconciliation

I see that we have this limitation, is there any update or different solution that you can propose?

https://github.com/Azure/application-gateway-kubernetes-ingress/issues/1567

Final design I would like to achieve is below.

Client

┌────────────────────────────────────────────┐

│ Azure Application Gateway │

│ (Public IP + Path Rules managed by AGIC) │

└────────────────────────────────────────────┘

│ │

│ ├──────────────► /green → Green app in AKS (works)

├───────────────────────────► / → Blue app in AKS (works)

└───────────────────────────► /path3 → SHOULD go to AKS and then to:

┌────────────────────────────┐

│ Azure Storage Account │

│ Static Website ($web) │

│ e.g. red.html │

└────────────────────────────┘

Azure Application Gateway
Azure Application Gateway

An Azure service that provides a platform-managed, scalable, and highly available application delivery controller as a service.

0 comments No comments

2 answers

Sort by: Most helpful
  1. Vallepu Venkateswarlu 10,430 Reputation points Microsoft External Staff Moderator
    2026-06-15T13:17:17.32+00:00

    Hi Bahlul Guliyev,

    Welcome to Microsoft Q&A Platform.

    I see what you’re trying to do: keep Application Gateway managed by AGIC for your AKS apps, but for one specific path (for example /path3) you want the gateway to send requests to Azure Blob Storage static website ($web/red.html).

    Key point about AGIC vs manual App Gateway configuration With AGIC, Kubernetes Ingress resources are the “source of truth,” and AGIC dynamically updates Application Gateway listeners, backend pools, and routing rules. Because of that, the general limitation you mentioned (manual additions being overwritten during AGIC reconciliation) applies in practice to things like adding storage-account backends/pools/rules manually.

    From the provided docs, AGIC’s integration model is described as “dynamically updates Application Gateway based on Kubernetes Ingress resources,” and also lists several limitations/requirements (v2 SKU required, etc.). The docs you provided don’t mention a supported way for you to “pin” a manual backend (like a Storage Account) so it won’t be changed by AGIC.

    What you can do with Application Gateway redirection (supported by the docs) If your goal is specifically: “for this path, send the client to Storage”, then you can use Application Gateway path-based redirection to an external URL (instead of trying to configure Storage as a backend pool).

    Application Gateway supports:

    • Path-based routing rules
    • Redirect action to an external site URL

    So the typical approach is:

    Configure an Application Gateway path-based rule for /path3

    • Set the action to Redirect
    • Set the target URL to the appropriate Storage static website endpoint, for example something like: https://<storage-static-website-host>/red.html (or your $web-mapped path)

    The relevant doc explicitly calls out this pattern: create a listener + add a Path-based rule, and set action to Redirect with the external URL.

    Note: the docs say rewrite rules are not designed for redirection to external sites—they’re primarily for modifying headers—so you’d want path-based redirect rather than rewrite.

    How to fit this with “App Gateway managed by AGIC” Based on what’s in the provided documentation, the cleanest conceptual fit is:

    • Use AGIC-managed routing for your AKS apps
    • Use Application Gateway path-based redirect logic for /path3 to an external Storage URL (rather than treating Storage as an App Gateway backend)

    However, the provided documentation does not confirm whether you can safely configure that redirect rule “outside AGIC” without it being overwritten—or whether you must express it via Kubernetes Ingress features supported by AGIC. So there’s a gap here. Practical recommendation

    • If redirecting the browser is acceptable (301/302 behavior), use path-based redirect to the Storage static website URL.
    • If you require reverse-proxy behavior (keeping the same URL/path while serving content from Storage behind the scenes), that would normally imply adding Storage as a backend, which conflicts with the AGIC “source of truth” model you described and the docs you provided don’t offer a supported workaround.

    References :

    Please210246-screenshot-2021-12-10-121802.pngand “up-vote” wherever the information provided helps you, **this can be beneficial to other community members..

    Was this answer helpful?

    0 comments No comments

  2. Divyesh Govaerdhanan 11,725 Reputation points MVP Volunteer Moderator
    2026-06-15T01:02:05+00:00

    Hello Bahlul Guliyev,

    Welcome to Microsoft Q&A,

    Thanks for the detailed write-up! You've identified the issue correctly. AGIC has full ownership of App Gateway configuration and will overwrite any manually added backends during reconciliation. This is an open, long-standing limitation with no native fix from the AGIC side yet.

    The cleanest workaround stays entirely within AGIC's control model: deploy an nginx reverse proxy pod inside AKS that forwards traffic to your Blob Storage static website. AGIC sees it as a normal Kubernetes Service, programs App Gateway accordingly, and your Blob Storage backend never needs to be added manually.

    This also matches your intended design, since /path3 goes through AKS before reaching Storage.

    1. Create the nginx ConfigMap
    2. Deploy the proxy Deployment, and Service
    3. Add /path3 to your AGIC Ingress

    AGIC will program App Gateway to route /path3 traffic to the nginx pod. Nginx rewrites the path and proxies to your Blob Storage static website. AGIC reconciliation will never interfere since blob-proxy-svc is a valid Kubernetes Service.

    References:

    Please Upvote and accept the answer if it helps!!

    Was this answer helpful?

    0 comments No comments

Your answer

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