Deploy NGINX Ingress Controller¶
In this section you will configure and deploy the NGINX Ingress Controller and expose it using a MetalLB load balancer.
Fast Forward
If you have already deployed NGINX Ingress Controller for serving, expand this box to fast-forward.
- Proceed to the Verify section.
Overview
What You’ll Need¶
- A configured management environment.
- Your clone of the Arrikto GitOps repository.
- An existing Kubernetes cluster on your premises.
- MetalLB Loab Balancer in your cluster.
Procedure¶
Go to your GitOps repository, inside your
rok-tools
management environment:root@rok-tools:~# cd ~/ops/deploymentsSpecify the platform to use:
root@rok-tools:~/ops/deployments# export PLATFORM=on-premConfigure
deploy
to use theon-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.yamlAir Gapped
Patch the kustomization to use the mirrored images:
root@rok-tools:~/ops/deployments# rok-image-patch \ > --kustomizations rok/nginx-ingress-controller-serving/overlays/deployFollow the on-screen instructions and provide any necessary input.
Commit your changes:
root@rok-tools:~/ops/deployments# git commit \ > -am "Deploy NGINX Ingress Controller"Deploy NGINX Ingress Controller:
root@rok-tools:~/ops/deployments# rok-deploy --apply rok/nginx-ingress-controller-serving/overlays/deploy
Verify¶
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 1mVerify 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.