Cannot Create Ingress Controller using TLS/Lets Encript Tutorial

Siegfried Heintze 1,886 Reputation points
2020-09-14T17:07:07.12+00:00

I'm following the directions for the Microsoft Tutorial Create an ingress controller with a static public IP address in Azure Kubernetes Service (AKS).

As per the instructions, I first get the resource group of my freshly created AKS cluster and then create a public IP address named my AksPublicIP.

Note: since I'm using Cygwin bash, I must type "az.cmd" instead of just "az".

Then it appears that I successfully create the ingress controller:

# Create a namespace for your ingress resources  
kubectl create namespace ingress-basic  
  
# Add the ingress-nginx repository  
helm repo add ingress-nginx https://kubernetes.github.io/ingress-nginx  
  
# Use Helm to deploy an NGINX ingress controller  
helm install nginx-ingress ingress-nginx/ingress-nginx \  
    --namespace ingress-basic \  
    --set controller.replicaCount=2 \  
    --set controller.nodeSelector."beta\.kubernetes\.io/os"=linux \  
    --set defaultBackend.nodeSelector."beta\.kubernetes\.io/os"=linux \  
    --set controller.service.loadBalancerIP="$STATIC_IP" \  
    --set controller.service.annotations."service\.beta\.kubernetes\.io/azure-dns-label-name"="$DNS_LABEL"  

I'm using cygwin bash and I have defined environment the appropriate environment variables for STATIC_IP and DNS_LABEL. I have DNS_LABEL dedined to be SIEGTODO.

However, this command never comes back to indicate that the ingress service has an external IP. It always says "<pending>" and when I did this yesterday I waited over an hour.

kubectl --namespace ingress-basic get services -o wide -w nginx-ingress-ingress-nginx-controller      

I found this entry while waiting: cant-create-ingress-controller-external-ip-stays-stuck-in-pending and decided to try again today but I've been waiting 30 minutes so far and it is still pending (like yesterday).

Yesterday, I completed the procedure in spite of the pending status and needless to say, I could not see the demo "Welcome to Azure Kubernetes Service". I enhanced the DNS name from the sample and got this error:

Hmmm… can't reach this page  
demo-aks-ingress.siegfried.cloudapp.azure.com’s server IP address could not be found.  
Try running Windows Network Diagnostics.  

What does this mean? Does it mean that the creation of my DNS "demo-aks-ingress.siegfried.cloudapp.azure.com" was successful but there was no server? If so, that should have caused a 404 error?

This command does not work either (no surprise):

az.cmd network public-ip list --resource-group $RG_AKS_TODO --query "[?name=='myAKSPublicIP'].[dnsSettings.fqdn]" -o tsv  

Please help me complete the tutorial so I can see the "Welcome to Azure Kubernetes Service" via ingress.

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

Accepted answer
  1. Alfredo Ramirez 76 Reputation points
    2020-09-16T06:22:28.447+00:00

    There's a couple of observations regarding the document:

    • A valid label should be supplied in the Ingress Helm Chart options (--set).
    • Latest ingress-nginx Helm Chart didn't work in AKS 1.16.13, but v2.16.0 did.
    • cert-manager should be deployed into the cert-manager namespace and apply the label to the cert-manager namespace as well.
    • Ingress resource hostname should match your DNS label in the IP address.

    Tried that myself and no issues.


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.