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

Unable to create 2 AGIC on the same cluster

Open mikevo13 opened this issue 2 years ago • 3 comments

Describe the bug Got below error message when trying to create 2 AGICs in the same cluster targeting 2 Application gateways:

Error: rendered manifests contain a resource that already exists. Unable to continue with install: Secret "networking-appgw-k8s-azure-service-principal" in namespace "kube-addon" exists and cannot be imported into the current release: invalid ownership metadata; annotation validation error: key "meta.helm.sh/release-name" must equal "private-ip": current value is "public-ip"

To Reproduce Initiate 2 Helm deployments with below configurations:

{
	appgw          = {
		name                  = "app-gw-priv-test"
		resourceGroup         = "rg-app-gw-test"
		shared                = "false"
		subResourceNamePrefix = "kube"
		subscriptionId        = "***********"
		usePrivateIP          = "true"
	}
	armAuth        = {
		secretJSON = "****"
		type       = "servicePrincipal"
	}
	kubernetes     = {
		ingressClass = "private-agw-ingress"
	}
	rbac           = {
		enabled = true
	}
	verbosityLevel = 3
}
{
	appgw          = {
		name                  = "app-gw-pub-test"
		resourceGroup         = "rg-app-gw-test"
		shared                = "false"		
		subResourceNamePrefix = "kube"
		subscriptionId        = "***********"
		usePrivateIP          = "false"
	}
	armAuth        = {
		secretJSON = "***"
		type       = "servicePrincipal"
	}
	kubernetes     = {
		ingressClass = "public-agw-ingress"
	}
	rbac           = {
		enabled = true
	}
	verbosityLevel = 3
}

Ingress Controller details

  • Output of kubectl describe pod <ingress controller> . The pod name can be obtained by running helm list.
  • Output of `kubectl logs .
  • Any Azure support tickets associated with this issue.

mikevo13 avatar Apr 11 '22 21:04 mikevo13

Same issue as I reported only difference I need an upgrade path #1355

ferronsw avatar Apr 14 '22 11:04 ferronsw

You can achieve two AGIC deployments in the same cluster by using ingressClass as you already did, do you have them in two separate namespaces?

JiayangZhou avatar Apr 25 '22 12:04 JiayangZhou

This is happening as both AGICs are using the same ingress class resource name which will lead to conflict. You can provide a different value for ingress class name by using providing kubernetes.ingressClassResource.name parameter in the Helm values. Remember to use the same name in the Ingress resource as well.

akshaysngupta avatar Jul 22 '22 17:07 akshaysngupta