Ingress
Harry
· 11 Sep 2026
· 9 views
What is Ingress?
Ingress is the layer-7 (HTTP/HTTPS) way to expose services to the outside world. Instead of giving every service a public IP (LoadBalancer), one Ingress controller routes external traffic to the right service based on host and path.
An Ingress Resource
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: web-ingress
spec:
rules:
- host: app.example.com
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: web
port:
number: 80kubectl apply -f ingress.yaml
kubectl get ingressIngress Controllers
The Ingress resource is only a set of rules. Something must implement them - typically an nginx or Traefik controller running as a Deployment in the cluster:
kubectl get pods -n ingress-nginxHost-Based Routing
rules:
- host: api.example.com
http:
paths:
- path: /v1
pathType: Prefix
backend:
service:
name: api
port:
number: 8080Now app.example.com and api.example.com share the same load balancer but route to different services.
Key Points
- Ingress = HTTP routing rules; an Ingress controller enforces them.
- Use Ingress instead of many LoadBalancer services to save IPs.
- HTTPS/TLS certificates are configured on the Ingress too.