application-gateway-kubernetes-ingress icon indicating copy to clipboard operation
application-gateway-kubernetes-ingress copied to clipboard

Documentation missing: brownfield deployment with multiple AKS clusters

Open pbloigu opened this issue 4 years ago • 2 comments

Describe the bug AGIC brownfield deployment, 2 AKS clusters. Both clusters having the following (the exact same) Ingress and Service definitions:

apiVersion: v1
kind: Service
metadata:
  name: myapp-proxy
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
  name: myapp-proxy

This resulted in a single rule and a single backend pool in the app gw, while there should've been obviously two rules and two backend pools (one of each for each of the two clusters).

Now, it took me some time to figure this out. There should exist some documentation for a "brownfield + multiple AKS" case detailing these kind of pitfalls. I was able to resolve this by renaming the services and ingresses in both clusters so that they differ. This however is not obvious from the K8s POV as one can most certainly use same naming in separate clusters.

To Reproduce See the description above.

pbloigu avatar Jul 01 '20 11:07 pbloigu

Or maybe you could prefix the pool and rule names with some cluster specific identifier?

pbloigu avatar Jul 01 '20 11:07 pbloigu

I faced with exact the same issue when two AKS clusters use single App Gateway via AGIC. Both clusters have PODS with the same name and namespace name, which results that App Gateway creates only one backend pool with one backend target.

If there is any way to somehow add prefix or rename backend pool using annotations? Because whatever will be done manually on App Gateway level, will be overridden by AGIC automatically.

kirillzekn avatar Dec 14 '23 08:12 kirillzekn