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
| Command | What it does |
|---|---|
kubectl get ingress -A | List all ingress rules |
kubectl describe ingress shop | Hosts, paths, backends, TLS |
kubectl get ingressclass | Available ingress controllers |
kubectl apply -f ingress.yaml | Apply 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
Kubectl Config and Context
Point kubectl at the right cluster and switch contexts safely.
Kubectl Pods
Inspect pods, describe failures, and get a shell inside.
Kubectl Deployments
Create, update, and inspect Deployments that own your pods.
Kubectl Services
Expose pods stably with ClusterIP, NodePort, and LoadBalancer.