Deploy NGINX Ingress Controller

In this section you will configure and deploy the NGINX Ingress Controller and expose it using a MetalLB load balancer.

What You’ll Need

Procedure

  1. Go to your GitOps repository, inside your rok-tools management environment:

    root@rok-tools:~# cd ~/ops/deployments
  2. Specify the platform to use:

    root@rok-tools:~/ops/deployments# export PLATFORM=on-prem
  3. Configure deploy to use the on-prem overlay as base:

    root@rok-tools:~/ops/deployments# j2 \ > rok/nginx-ingress-controller-serving/overlays/deploy/kustomization.yaml.j2 \ > -o rok/nginx-ingress-controller-serving/overlays/deploy/kustomization.yaml
  4. Commit your changes:

    root@rok-tools:~/ops/deployments# git commit \ > -am "Deploy NGINX Ingress Controller"
  5. Deploy NGINX Ingress Controller:

    root@rok-tools:~/ops/deployments# rok-deploy --apply rok/nginx-ingress-controller-serving/overlays/deploy

Verify

  1. Verify that NGINX Ingress Controller is up-and-running. Check Pod status and verify field STATUS is Running and field READY is 1/1:

    root@rok-tools:~/ops/deployments# kubectl -n ingress-nginx-serving get pods NAME READY STATUS RESTARTS AGE ingress-nginx-controller-7f74f657bd-ln59l 1/1 Running 0 1m
  2. Verify that the Load Balancer Service has an external IP:

    root@rok-tools:~/ops/deployments# kubectl -n ingress-nginx-serving get service NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE ingress-nginx LoadBalancer 10.32.1.249 10.0.0.2 80:30099/TCP,443:30719/TCP 1m

Summary

You have successfully deployed the NGINX Ingress Controller and exposed it using MetalLB Load Balancer.

What’s Next

The next step is to assign an FQDN to your Load Balancer IP address.