"Unlock Secure Local Kubernetes Development: Ingress + TLS with NGINX on Kind"
Kubernetes Ingress with NGINX + TLS on Kind (Local Setup Guide)
Managing traffic in Kubernetes can be tricky—especially when exposing multiple services through a single IP or domain. Ingress solves that problem. In this guide, we’ll walk through how to use NGINX Ingress Controller on a Kind (Kubernetes-in-Docker) cluster, and secure it with TLS using a self-signed certificate.
🧠 What Is Ingress in Kubernetes?
Ingress is a Kubernetes object that lets you define rules for routing HTTP and HTTPS traffic to services inside your cluster. It acts like a smart reverse proxy that handles path-based or host-based routing.
However, Ingress rules don't work on their own—you need an Ingress Controller, like NGINX, to enforce them.
🛠️ Step-by-Step Setup
This tutorial covers:
Setting up a Kind cluster with Ingress support
Installing the NGINX Ingress Controller
Deploying a sample HTTP app
Creating a TLS certificate with OpenSSL
Exposing the app securely via HTTPS
1️⃣ Create a Kind Cluster with Ingress Support
Save the following to kind-config.yaml:
Create the cluster:
2️⃣ Install NGINX Ingress Controller
Apply the official NGINX Ingress manifest:
Wait for it to be ready:
3️⃣ Deploy a Sample App (login)
Create a file login-deployment.yaml:
Apply it:
4️⃣ Generate a TLS Certificate with OpenSSL
Create the TLS secret:
5️⃣ Create the Ingress Resource with TLS
Save as app-ingress-tls.yaml:
Apply it:
6️⃣ Update Your Hosts File
7️⃣ Test It!
The flag allows for accepting self-signed certs.
Output:
✅ Conclusion
You’ve now:
Built a Kind cluster with Ingress support
Installed NGINX Ingress Controller
Deployed a sample app
Secured it with HTTPS using TLS
This setup is ideal for testing Ingress features locally before moving to production clusters.