Azure Kubernetes with ingress-nginx-controller and external static ip is not accessed from the outside.

Piotr Makowiec 40 Reputation points
2023-05-14T08:51:18.05+00:00

I've got an Azure Kubernetes Cluster. I also have a Public IP Address resource. Public IP Address is within the same resource group as aks-vnet. The Public IP Address is assigned front-end ip configuration for kubernetes load balancer service. I have installed ingress-nginx-controller with external ip address

controller was created with the script:
helm upgrade --install nginx-ingress ingress-nginx/ingress-nginx --set controller.replicaCount=2 --set controller.service.loadBalancerIP="ip-address" --set controller.service.annotations."service\.beta\.kubernetes\.io/azure-load-balancer-resource-group"="group-name" --set controller.service.annotations."service\.beta\.kubernetes\.io/azure-dedicated-public-ip"="true" --set controller.service.externalTrafficPolicy=Local --set controller.service.annotations."service\.beta\.kubernetes\.io/azure-load-balancer-health-probe-request-path"=/healthz

I heard about some issues, that could have been resolved by setting externallTraficPolicy to local and health probe request path to /healthz, but it didn't work.

When requesting ip address server doesn't response.

Do you have any ideas why it doesn't work?

Thank you

Azure Kubernetes Service
Azure Kubernetes Service
An Azure service that provides serverless Kubernetes, an integrated continuous integration and continuous delivery experience, and enterprise-grade security and governance.
2,447 questions
{count} votes

Accepted answer
  1. AirGordon 7,150 Reputation points
    2023-05-14T09:40:35.0066667+00:00

    Pretty sure you only need to provide health probe request path when your app doesn't respond on the root "/". This can be the case for some dot net app where the routing defaults to "/api", in these cases /healthz can be useful.

    I'd suggest you get a known good app working and then figure out the delta between that app and yours. If both don't work then you likely have an infrastructure issue and not a cluster one (eg. an NSG blocking all incoming traffic).
    The app i tend to use for this is the Azure Voting App. You can see one of my manifests here: https://github.com/Gordonby/Snippets/blob/master/AKS/Azure-Vote-Labelled-ILB-WarIngress-NetPolicy.yaml
    Install nginx again on the cluster with default config a different ingressClassName and see how you fare.

    NB: If you're going to use my manifest file, make sure to change line 101 (IngressClassName). Also note that i'm additionally exposing my service via another LoadBalancer on line 90 - this is helpful for debugging an App Problem vs an Ingress problem during development.

    1 person found this answer helpful.

2 additional answers

Sort by: Most helpful
  1. Deleted

    This answer has been deleted due to a violation of our Code of Conduct. The answer was manually reported or identified through automated detection before action was taken. Please refer to our Code of Conduct for more information.


    Comments have been turned off. Learn more

  2. Deleted

    This answer has been deleted due to a violation of our Code of Conduct. The answer was manually reported or identified through automated detection before action was taken. Please refer to our Code of Conduct for more information.

    1 deleted comment

    Comments have been turned off. Learn more

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.