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

AGIC address column empty and not updating app gw

Open pmula-onbe opened this issue 3 years ago • 1 comments

Describe the bug

Created an appgw and enabled aks ingress addon with that existing appgw. After deploying a test app, ingress address column it's empty and the application gateway it's not updating when modifying the ingress, deployment, etc

image

To Reproduce Creation appgw: az network application-gateway create -n aks-appgw-ingress -l westus2 -g rg1 --sku Standard_v2 --public-ip-address pip1 --vnet-name vnet1 --subnet subnet1

Enable add-on: appgwId=$(az network application-gateway show -n aks-appgw-ingress -g rg1 -o tsv --query "id") az aks enable-addons -n aks-cluster-westus2 -g rg2 -a ingress-appgw --appgw-id $appgwId

Install guestbook app following this article: https://azure.github.io/application-gateway-kubernetes-ingress/tutorials/tutorial.general/

Ingress Controller details

kubectl describe pod ingress-appgw-deployment-687df9db49-qzc27 -n kube-system

Name:         ingress-appgw-deployment-687df9db49-qzc27
Namespace:    kube-system
Priority:     0
Node:         aks-default-25497047-vmss000000/10.240.0.4
Start Time:   Wed, 15 Dec 2021 20:07:51 -0600
Labels:       app=ingress-appgw
              kubernetes.azure.com/managedby=aks
              pod-template-hash=687df9db49
Annotations:  checksum/config: fc733bbc7cadd1229521a03c4fa680c9fa489b1a6003813a3cb70e469e831594
              cluster-autoscaler.kubernetes.io/safe-to-evict: true
              kubernetes.azure.com/metrics-scrape: true
              prometheus.io/path: /metrics
              prometheus.io/port: 8123
              prometheus.io/scrape: true
              resource-id:
                /subscriptions/6a761677-8511-4f7b-8bed-fc11d537e10b/resourceGroups/rg-om-cluster-preprod/providers/Microsoft.ContainerService/managedClust...
Status:       Running
IP:           10.240.0.162
IPs:
  IP:           10.240.0.162
Controlled By:  ReplicaSet/ingress-appgw-deployment-687df9db49
Containers:
  ingress-appgw-container:
    Container ID:   containerd://1da9922b81757a13307074655d337831545cdd5dcec4d49421ea627419137d9a
    Image:          mcr.microsoft.com/azure-application-gateway/kubernetes-ingress:1.4.0
    Image ID:       sha256:533f2cbe57fa92d27be5939f8ef8dc50537d6e1240502c8c727ac4020545dd34
    Port:           <none>
    Host Port:      <none>
    State:          Running
      Started:      Wed, 15 Dec 2021 21:02:27 -0600
    Last State:     Terminated
      Reason:       Error
      Exit Code:    255
      Started:      Wed, 15 Dec 2021 20:53:39 -0600
      Finished:     Wed, 15 Dec 2021 21:02:11 -0600
    Ready:          True
    Restart Count:  6
    Limits:
      cpu:     700m
      memory:  300Mi
    Requests:
      cpu:      100m
      memory:   20Mi
    Liveness:   http-get http://:8123/health/alive delay=15s timeout=1s period=20s #success=1 #failure=3
    Readiness:  http-get http://:8123/health/ready delay=5s timeout=1s period=10s #success=1 #failure=3
    Environment Variables from:
      ingress-appgw-cm  ConfigMap  Optional: false
    Environment:
      AZURE_CLOUD_PROVIDER_LOCATION:  /etc/kubernetes/azure.json
      AGIC_POD_NAME:                  ingress-appgw-deployment-687df9db49-qzc27 (v1:metadata.name)
      AGIC_POD_NAMESPACE:             kube-system (v1:metadata.namespace)
      KUBERNETES_PORT_443_TCP_ADDR:   aks-om-cluster-preprod-westus2-f78d22b1.hcp.westus2.azmk8s.io
      KUBERNETES_PORT:                tcp://aks-om-cluster-preprod-westus2-f78d22b1.hcp.westus2.azmk8s.io:443
      KUBERNETES_PORT_443_TCP:        tcp://aks-om-cluster-preprod-westus2-f78d22b1.hcp.westus2.azmk8s.io:443
      KUBERNETES_SERVICE_HOST:        aks-om-cluster-preprod-westus2-f78d22b1.hcp.westus2.azmk8s.io
    Mounts:
      /etc/kubernetes/azure.json from cloud-provider-config (ro)
      /var/run/secrets/kubernetes.io/serviceaccount from ingress-appgw-sa-token-ppdt4 (ro)
Conditions:
  Type              Status
  Initialized       True
  Ready             True
  ContainersReady   True
  PodScheduled      True
Volumes:
  cloud-provider-config:
    Type:          HostPath (bare host directory volume)
    Path:          /etc/kubernetes/azure.json
    HostPathType:  File
  ingress-appgw-sa-token-ppdt4:
    Type:        Secret (a volume populated by a Secret)
    SecretName:  ingress-appgw-sa-token-ppdt4
    Optional:    false
QoS Class:       Burstable
Node-Selectors:  <none>
Tolerations:     node.kubernetes.io/memory-pressure:NoSchedule op=Exists
                 node.kubernetes.io/not-ready:NoExecute op=Exists for 300s
                 node.kubernetes.io/unreachable:NoExecute op=Exists for 300s
Events:
  Type     Reason     Age                   From               Message
  ----     ------     ----                  ----               -------
  Normal   Scheduled  61m                   default-scheduler  Successfully assigned kube-system/ingress-appgw-deployment-687df9db49-qzc27 to aks-default-25497047-vmss000000
  Normal   Pulled     15m (x6 over 61m)     kubelet            Container image "mcr.microsoft.com/azure-application-gateway/kubernetes-ingress:1.4.0" already present on machine
  Normal   Created    15m (x6 over 61m)     kubelet            Created container ingress-appgw-container
  Normal   Started    15m (x6 over 61m)     kubelet            Started container ingress-appgw-container
  Warning  BackOff    6m40s (x17 over 43m)  kubelet            Back-off restarting failed container

kubectl logs ingress-appgw-deployment-687df9db49-qzc27 -n kube-system

I1216 03:11:22.224477       1 utils.go:115] Using verbosity level 5 from environment variable APPGW_VERBOSITY_LEVEL
I1216 03:11:22.305619       1 environment.go:248] KUBERNETES_WATCHNAMESPACE is not set. Watching all available namespaces.
I1216 03:11:22.305647       1 main.go:117] Using User Agent Suffix='ingress-appgw-deployment-687df9db49-qzc27' when communicating with ARM
I1216 03:11:22.305739       1 main.go:136] Appication Gateway Details: Subscription="6a761677-8511-4f7b-8bed-fc11d537e10b" Resource Group="MC_rg-om-cluster-preprod_aks-om-cluster-preprod-westus2_westus2" Name="aks-appgw-ingress-preprod"
I1216 03:11:22.305750       1 auth.go:46] Creating authorizer from Azure Managed Service Identity
I1216 03:11:22.305771       1 client.go:118] Getting Application Gateway configuration.
I1216 03:11:22.305888       1 httpserver.go:57] Starting API Server on :8123

Just mention that the ingress it's working if I manually update the application gateway. Address column still empty.

pmula-onbe avatar Dec 16 '21 03:12 pmula-onbe

hey @pmula-onbe did you find a solution for this?

ZOLUXERO avatar Jun 24 '23 00:06 ZOLUXERO