Ingress is a Kubernetes API object that describes how external HTTP and HTTPS traffic should be routed to Services inside a cluster, based on hostnames and URL paths. The rules do nothing alone; an ingress controller, such as one based on nginx or Envoy, reads them and does the actual proxying.
Why it matters
Without ingress, exposing each web service would need its own load balancer and public IP. A single ingress controller can serve many hostnames, terminate TLS certificates and apply redirects or rate limits. When a site behind Kubernetes returns 502 or 404 errors, the ingress rules and the controller's logs are often the first place to look.
Example
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: shop
spec:
ingressClassName: nginx
rules:
- host: shop.example.com
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: web
port:
number: 80
Common mistakes
- Creating an Ingress without installing a controller, so nothing happens.
- Pointing at a Service name or port that does not exist, producing 503 or 502 errors.
- Forgetting the ingress class, so no controller claims the rule.
- Newer Gateway API resources are replacing some uses, so check which your cluster supports.
Related
Get notified when this term updates
Plus occasional practical tips on uptime and monitoring, nothing else. Unsubscribe anytime.
This page is general information written by our editorial team and updated when documentation changes. Servers and providers differ, so test changes safely first. See our editorial policy and disclaimer.