Installing Ingress-Nginx

Step 1: Add the repo of the ingress-nginx repository to your helm config:

helm repo add ingress-nginx https://kubernetes.github.io/ingress-nginx
helm repo update

Step 2: Install the Nginx ingress controller in the ingress-basic-pscloudapp namespace created in the previous step.

  • The static public IP address created in the earlier step will be assigned to the ingress controller using the --set controller.service.loadBalancerIP parameter.

  • For added redundancy, two replicas of the Nginx ingress controllers are deployed with the --set controller.replicaCount parameter.

  • The ingress controller also needs to be scheduled on a Linux node. Windows Server nodes shouldn't run the ingress controller. A node selector is specified using the --set nodeSelector parameter to tell the Kubernetes scheduler to run the Nginx ingress controller on a Linux-based node.

helm install nginx-ingress ingress-nginx/ingress-nginx \
        --namespace ingress-basic-pscloudapp \
        --set controller.replicaCount=2 \
        --set controller.nodeSelector."beta\.kubernetes\.io/os"=linux \
        --set defaultBackend.nodeSelector."beta\.kubernetes\.io/os"=linux \
        --set controller.admissionWebhooks.patch.nodeSelector."beta\.kubernetes\.io/os"=linux \
        --set controller.service.loadBalancerIP="52.143.79.245"

Step 3: View the installed Nginx ingress controller.

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

A Kubernetes load balancer service is created for the Nginx ingress controller; and the static public IP address is assigned.