IP is not getting assigned to Azure Application Gateway Ingress hence pod is not coming up due to readiness probe failure

Reshma Nair 120 Reputation points
2024-02-21T16:09:47.9233333+00:00

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. User's image

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.

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,073 questions
{count} votes

Accepted answer
  1. Anveshreddy Nimmala 3,540 Reputation points Microsoft Vendor
    2024-02-26T05:22:15.2166667+00:00

    Hi Reshma Nair,

    thankyou for replying back.

    Ensure that the Application Gateway and the AKS cluster are in the same virtual network but in different subnets.

    Associate the same route table created by AKS to the Application Gateway's subnet.

    Check if the ingress resource is created successfully and annotated with kubernetes.io/ingress.class: azure/application-gateway.

    Verify that the AGIC pod is running.

    Check the AGIC pod logs for any useful information.

    If necessary, increase the verbosity of the AGIC logs by setting the appgw.ingress.kubernetes.io/log-level annotation to debug.

    Hope this helps you.

    1 person found this answer helpful.

0 additional answers

Sort by: Most helpful

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.