0

I have created helm charts for deploying the kubernetes objects. I have created services, ingress and deployments for hosting my microservices. I created application gateway and I'm trying to use application gateway as public load balancer for my cluster. But my ingress not pointing to application gateway load balancer and ip address also showing empty.

please find my configuration values below.

Ingress.yaml

apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: myingress
  annotations:
    kubernetes.io/ingress.class: azure/application-gateway
spec:
  rules:
  - http:
      paths:
      - path: /
        pathType: Prefix
        backend:
          service:
            name: demo-microservice
            port:
              number: 80

Service.yaml

apiVersion: v1
kind: Service
metadata:
  name: "{{ .Values.name }}"
   labels:
    app: "{{ .Values.name }}"
spec:
  type: ClusterIP
  selector:
    app: "{{ .Values.name }}"
  ports:
    - protocol: TCP
      name: http
      port: 80
      targetPort: 80


  

Note : Also I have enabled Ingress controller and mapped my application gateway while creating the cluster.

enter image description here

But IP address is not got assigned. My azure application gateway loadbalancer also not redirecting to my application. I'm not sure what I'm missing. Anyone please assist me on this

enter image description here]2

Reference aks ingress address is empty

Debugger
  • 690
  • 1
  • 18
  • 41
  • I am confused why do you have `ingress.class` annotation on a `Service`, its supposed to be only on `Ingress`. Also the Service you have shown is type `LoadBalancer` is same as `demo-microservice` service which your ingress points to? – YK1 Nov 07 '21 at 10:18
  • Sorry for the confusion @YK1. I have updated my service.yaml. Yes I have to point demo-microservice and other microservices later to my Ingress. – Debugger Nov 07 '21 at 10:32
  • I have a similar problem. There are `E0221 11:41:34.895822 1 reflector.go:138] pkg/mod/k8s.io/client-go@v0.21.2/tools/cache/reflector.go:167: Failed to watch *v1beta1.Ingress: failed to list *v1beta1.Ingress: the server could not find the requested resource (get ingresses.extensions) ` log messages which indicate a version conflict. `kubectl describe pod ingress-appgw-deployment-` shows that `mcr.microsoft.com/azure-application-gateway/kubernetes-ingress:1.5.0-rc1` is installed. The rc1 has a bug causeing this. It seems the addon deploys the wrong version of the ingress ctrl – user1110502 Feb 21 '22 at 12:08

1 Answers1

0

Please check that the cluster is configured with the Application Gateway AddOn:

--[appgw-name][--appgw-subnet-cidr][--appgw-subnet-id]
Jeremy Caney
  • 7,102
  • 69
  • 48
  • 77
  • Yes Cluster is configured with the Application Gateway Addon . I confirmed via portal and also via powershell - Output The ingress-appgw addon is already enabled for this managed cluster. – Debugger Nov 07 '21 at 06:02