Understanding Kubernetes: Part 17 -Ingress

If you’ve been following our Kubernetes series 2025, welcome back! For new readers, check out Part 16: Understanding Kubernetes: Load Balancer Service
What is Ingress in Kubernetes?
An Ingress in Kubernetes is an API object that manages external access to services within a cluster, typically HTTP and HTTPS traffic. Unlike a LoadBalancer service, which exposes an application using an external IP, Ingress provides routing rules to direct traffic to different services based on paths or hostnames. It acts as a Layer 7 (HTTP/HTTPS) load balancer and can provide features such as SSL termination, name-based virtual hosting, and more.
Example Use Case:
Suppose you have multiple microservices (e.g., web
, api
, admin
) running in your cluster, and you want to expose them under a single domain name (example.com
). An Ingress can route requests like:
example.com/web
→ Routes to theweb
serviceexample.com/api
→ Routes to theapi
serviceexample.com/admin
→ Routes to theadmin
service
Capabilities:
Path-Based and Host-Based Routing:
Direct traffic to specific services based on URL paths or domain names
2. SSL/TLS Termination:
Secure your application by handling HTTPS traffic via TLS certificates.
3. Load Balancing:
Distributes incoming traffic across backend Pods efficiently.
4. Authentication and Authorization:
Supports additional security features using annotations (e.g., OAuth, JWT).
5. Rewrite and Redirect Rules:
Modify request URLs to simplify or change the routing logic.
6. Integration with Ingress Controllers:
Requires an Ingress Controller such as Nginx, Traefik, or AWS ALB Ingress.
YAML Example:
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: my-ingress
annotations:
nginx.ingress.kubernetes.io/rewrite-target: /
spec:
rules:
- host: example.com
http:
paths:
- path: /web
pathType: Prefix
backend:
service:
name: web-service
port:
number: 80
- path: /api
pathType: Prefix
backend:
service:
name: api-service
port:
number: 80
Explanation:
The Ingress routes traffic for
example.com/web
toweb-service
andexample.com/api
toapi-service
.The
rewrite-target
annotation modifies incoming requests to remove the prefix.Requires an Ingress Controller like Nginx to be deployed in the cluster.
In My Previous Role:
As a Senior DevOps Engineer, I effectively utilized Kubernetes Ingress to optimize application exposure in production environments. I implemented Nginx Ingress to manage HTTP and HTTPS traffic across multiple microservices, enabling:
Seamless routing and load balancing for customer-facing services.
Secure HTTPS traffic using TLS certificates managed via Let’s Encrypt.
Improved deployment flexibility by consolidating multiple services under a single domain.
Automated Ingress rule updates via CI/CD pipelines to ensure zero-downtime deployments.
This approach helped reduce operational complexity and improved application availability by providing a unified access point with enhanced security features.
🚀 Ready to Master Kubernetes?
Take your Kubernetes journey to the next level with the Master Kubernetes: Zero to Hero course! 🌟 Whether you’re a beginner or aiming to sharpen your skills, this hands-on course covers:
✅ Kubernetes Basics — Grasp essential concepts like nodes, pods, and services. ✅ Advanced Scaling — Learn HPA, VPA, and resource optimization. ✅ Monitoring Tools — Master Prometheus, Grafana, and AlertManager. ✅ Real-World Scenarios — Build production-ready Kubernetes setups.
🎓 What You’ll Achieve
💡 Confidently deploy and manage Kubernetes clusters. 🛡️ Secure applications with ConfigMaps and Secrets. 📈 Optimize and monitor resources for peak performance.
🔥 Start Learning Now: [Join the Master Kubernetes Course](https://cloudops0.gumroad.com/l/k8s)
Don’t miss your chance to become a Kubernetes expert! 💻✨
🚀 Stay ahead in DevOps and SRE! 🔔 Subscribe now and never miss a beat on Kubernetes and more. 🌟
Last updated