Kubectl Ingress

Route external HTTP traffic to services by host and path.

  • kubernetes ingress
  • ingress controller
  • host routing
  • tls ingress
  • gateway api

Kubectl Ingress

Route external HTTP traffic to services by host and path.

Commands

CommandWhat it does
kubectl get ingress -AList all ingress rules
kubectl describe ingress shopHosts, paths, backends, TLS
kubectl get ingressclassAvailable ingress controllers
kubectl apply -f ingress.yamlApply routing rules
curl -H "Host: shop.example.com" http://<lb-ip>/Test routing directly

Example

kubectl get ingress -n shop
kubectl describe ingress shop -n shop
curl -H "Host: shop.example.com" http://10.0.0.5/healthz

FAQ

Ingress vs Gateway API?

Ingress is the classic single-resource routing; Gateway API splits roles (infra vs app routes) and is the future standard.

502 from ingress — where to look?

Backend pods/endpoints first, then controller logs; misconfigured service ports cause most 502s.

常見問題

Ingress vs Gateway API?
Ingress is the classic single-resource routing; Gateway API splits roles (infra vs app routes) and is the future standard.
502 from ingress — where to look?
Backend pods/endpoints first, then controller logs; misconfigured service ports cause most 502s.

Kubernetes