Learn how to set up a Kubernetes Ingress Controller with NGINX in this tutorial.
Ingress controllers are a crucial component of Kubernetes clusters, providing a single entry point for incoming HTTP requests. By using NGINX as your ingress controller, you can take advantage of its powerful features and scalability.
In this video, we'll walk you through the step-by-step process of setting up a Kubernetes Ingress Controller with NGINX, covering topics such as deploying NGINX, configuring ingress resources, and testing your setup. By the end of this video, you'll have a fully functional Kubernetes Ingress Controller with NGINX, ready to handle incoming traffic to your cluster.
Step-by-Step Guide: Ingress on Minikube
-------------------------------------------------------------
Step1. Enable the Ingress Controller
"minikube addons enable ingress"
This creates:
NGINX Ingress Controller deployment
Service (type - NodePort)
Necessary RBAC
Confirm it’s running:
kubectl get pods -n ingress-nginx
kubectl get svc -n ingress-nginx
Step2. Create Your App, Service, and Ingress with
deployment.yaml
service.yaml
ingress.yaml
Step3. Apply the Resources:
kubectl apply -f deployment.yaml
kubectl apply -f service.yaml
kubectl apply -f ingress.yaml
Step4. Edit /etc/hosts to Access via demo.local
Get Minikube IP:
minikube ip
Step5. Then add this to your local machine's
hosts file (/etc/hosts):
[minikube-ip] demo.local
Example:
192.168.49.2 demo.local
This makes http://demo.local route to your
app inside Minikube via Ingress.
Step6. Test It
curl http://demo.local
or open in browser
http://demo.local