Home NGINX Ingress Controller for Kubernetes
Post
Cancel

NGINX Ingress Controller for Kubernetes

In this tutorial I show you how to install and configure the NGINX Ingress Controller for Kubernetes. The NGINX Ingress Controller is a popular Ingress controller that is used to route external traffic to services in a Kubernetes cluster. It provides features such as SSL termination, load balancing, and path-based routing. This is a great way to expose your services to the outside world and manage traffic to your applications. I’ve personally had better luck with this controller than the default one that comes with Kubernetes or even using cloud provider solutions such as Azure’s Application Gateway. This strategy also allows you to use the same controller across multiple cloud providers.

Step by Step Guide

Prerequisites

Before you begin, make sure you have helm installed on your machine. On Mac you can do this simply with brew brew install helm. Official Helm Documentation.

Install Chart

Okay, lets install the NGINX Ingress Controller chart.

1
helm install <MyIngress> oci://ghcr.io/nginxinc/charts/nginx-ingress --version 1.1.3

Okay seriously, that’s it. You should now have the NGINX Ingress Controller running in your cluster. You can check the status of the pods by running kubectl get pods -n <MyIngress>.

Upgrading the Chart

If you need to upgrade the chart, you can do so with the helm upgrade command. Helm does not upgrade the CRDs during a release upgrade. Before you upgrade a release, see Upgrading the CRDs.

Upgrading CRDs

1
kubectl apply -f https://raw.githubusercontent.com/nginxinc/kubernetes-ingress/v3.4.3/deploy/crds.yaml

Upgrade the release

1
helm upgrade <MyIngress> .

Uninstalling the CRDs

To remove the CRDs, pull the chart sources as described in Pulling the Chart and then run:

1
kubectl delete -f crds/

Warning: This command will delete all the corresponding custom resources in your cluster across all namespaces. Please ensure there are no custom resources that you want to keep and there are no other Ingress Controller releases running in the cluster.

Uninstalling the Chart

To uninstall/delete the release my-release:

1
helm uninstall MyIngress

ref: NGINX Ingress Controller Installation Guide.

This post is licensed under CC BY 4.0 by the author.