I have created a private AKS cluster(subnet: AKSSubnet) with Application Gateway as Ingress controller using terraform.
ingress_application_gateway {
gateway_name = "appgw-ingress"
subnet_cidr = ".../24"
}
After cluster creation I deployed the Kubernetes manifests(namespace, service, ingress. deployment....) which are terraform files. My ingress class is azure-application-gateway.
resource "kubernetes_ingress_v1" "ingress" {
metadata {
name = "appgw-ingress"
namespace = "aks-ns"
annotations = {
"appgw.ingress.kubernetes.io/cookie-based-affinity" = "true"
"appgw.ingress.kubernetes.io/ssl-redirect" = "true"
}
}
spec {
ingress_class_name = "azure-application-gateway"
Everything got deployed successfully but IP address is not assigned to the Ingress.
Because of this I am not able to make the DNS entry for our domain for Ingress host. Hence my pod is also not coming up due to readiness probe failure as it is redirecting to the same ingress host.
I tried adding the application-gateway-pip from the MC* Resource Group but of no use.
readiness_probe {
http_get {
path = "/"
port = 80
host = <ingress-host">
}
initial_delay_seconds = 10
period_seconds = 10
timeout_seconds = 10
}
}
}
}
I tried many ways and everything failed. I don't have deep knowledge in networking. Any leads will be helpful. Thanks in advance.