Nginx Ingress Installation: Traffic and TLS Management with Helm on Kubernetes
What Will You Learn in This Guide?
In this guide, you will learn how to install Nginx Ingress Controller in your Kubernetes cluster.
You will direct traffic with Helm, perform domain-based routing, and provide HTTPS with Let's Encrypt.
Technical Summary
This guide explains how to install Nginx Ingress on Kubernetes.
The aim is to open services to the outside world in a secure and centralized manner.
1. Creating Test Applications
Two sample services are created to test Ingress routing.
kubectl create -f hello-kubernetes-first.yaml
- This command creates the first test application and service.
kubectl create -f hello-kubernetes-second.yaml
- This command creates the second test application and service.
2. Installing Nginx Ingress Controller with Helm
- Nginx-based controller for Ingress rules is installed.
helm repo add ingress-nginx https://kubernetes.github.io/ingress-nginx
- This command adds the Nginx Ingress Helm repository.
helm repo update
- This command updates the Helm chart list.
helm install nginx-ingress ingress-nginx/ingress-nginx \
--set controller.publishService.enabled=true
- This command installs Nginx Ingress Controller with Load Balancer.
3. Creating an Ingress Source
- Ingress is defined for domain-based routing.
kubectl apply -f hello-kubernetes-ingress.yaml
- This command connects domains to relevant services.
From browser:
-
hw1.domain.com
-
hw2.domain.com
addresses are tested.
4. Providing HTTPS with Cert-Manager
- Cert-Manager is installed to automatically generate TLS certificates.
kubectl create namespace cert-manager
- This command creates a separate namespace for Cert-Manager.
helm repo add jetstack https://charts.jetstack.io
helm repo update
- This command adds the Cert-Manager Helm repository.
helm install cert-manager jetstack/cert-manager \
--namespace cert-manager \
--set installCRDs=true
- This command activates Cert-Manager in the cluster.
5. Let's Encrypt ClusterIssuer Definition
- ClusterIssuer is created for automatic certificate generation.
kubectl apply -f production_issuer.yaml
- This command defines the Let's Encrypt production environment.
6. Adding TLS to Ingress
- TLS configuration is added to the Ingress definition.
kubectl apply -f hello-kubernetes-ingress.yaml
- This command connects HTTPS certificates to Ingress.
Check certificate status:
kubectl describe certificate hello-kubernetes-tls
- This command indicates that the certificate was generated successfully.
Frequently Asked Questions (FAQ)
1. Why use Ingress instead of Service? Ingress manages multiple services with a single Load Balancer.
2. Why is Helm preferred? Installation, update and rollback operations become easier.
3. Do TLS certificates automatically renew? Yes, Cert-Manager does this in the background.
4. How many domains can be managed with the same Ingress? A single Ingress can direct many domains.
5. Does Ingress work without HTTPS? Yes, but it is not recommended for security and SEO reasons.
Result
With this guide, Nginx Ingress, Helm and Let's Encrypt were configured together on Kubernetes. Now you can publish your applications in a secure, scalable and centralized manner.
You can try GenixNode solutions now to move your Kubernetes infrastructure to the production environment.

