Installing the Bitnami NGINX Ingress Controller with Helm
In this blog post, I'll walk you through how to install the Bitnami NGINX Ingress Controller using Helm, including how to customize the installation to make it your cluster's default ingress controller.
Before we begin, make sure you have:
First, let's add the Bitnami Helm repository to your Helm configuration:
helm repo add bitnami https://charts.bitnami.com/bitnami
helm repo update
To customize the installation, we'll first fetch the default values file:
helm show values bitnami/nginx-ingress-controller > nginx-values.yaml
This creates a nginx-values.yaml
file with all the default configuration options.
Open the nginx-values.yaml
file in your favorite text editor. We'll make several key modifications:
controller:
ingressClassResource:
name: nginx
enabled: true
default: true
Save your changes when you're done customizing.
Now we're ready to install using our customized values file:
helm install nginx-ingress bitnami/nginx-ingress-controller \
--namespace ingress-nginx \
--create-namespace \
-f nginx-values.yaml
This command:
ingress-nginx
nginx-ingress
Check that the pods are running:
kubectl get pods -n ingress-nginx
Verify the ingress class was created and is default:
kubectl get ingressclass
The output should show your ingress class with DEFAULT
in the CONTROLLER
column.
To test that your ingress controller is working properly, you can deploy a sample application:
kubectl create deployment demo --image=nginx --port=80
kubectl expose deployment demo --port=80
kubectl create ingress demo --class=nginx --rule="demo.yourdomain.com/*=demo:80"
You've now successfully installed the Bitnami NGINX Ingress Controller using Helm with custom configuration to make it your cluster's default ingress controller. This setup provides a robust, production-ready ingress solution that can handle routing traffic to your Kubernetes services.
Remember to regularly check for updates to the chart and consider implementing monitoring and alerting for your ingress controller to ensure high availability for your applications.