Skip to content

Ingress and Gateway API

Draft: not yet run against a live cluster. Treat output as representative and check it on yours.

An Ingress object does nothing on its own. It’s configuration for a controller you have to install, and most edge failures come from the gap between what you wrote and what the controller actually loaded.

  1. The controller watches its objects. It only acts on Ingresses whose ingressClassName (or Gateways whose gatewayClassName) matches it. Anything else is silently ignored.

  2. It builds proxy configuration from hosts, paths, TLS Secrets, and backend Services, then reloads or hot-updates the proxy.

  3. It resolves backends to pod IPs. Most controllers read EndpointSlices and send traffic straight to pods, skipping kube-proxy. So a Service with no Ready endpoints means 503 at the edge.

  4. TLS is terminated at the controller using the Secret named in the Ingress tls section or the Gateway listener’s certificateRefs. If the Secret is missing or invalid, most controllers fall back to a default self-signed certificate rather than failing loudly.

The steps below use a Gateway API implementation. Install one for kind by following its own documentation (Envoy Gateway, Istio, Cilium, NGINX Gateway Fabric, and others implement it), and install the Gateway API CRDs at the version that implementation requires.

route.yaml
apiVersion: gateway.networking.k8s.io/v1
kind: Gateway
metadata:
name: edge
spec:
gatewayClassName: <your-implementation-class>
listeners:
- name: http
protocol: HTTP
port: 80
---
apiVersion: gateway.networking.k8s.io/v1
kind: HTTPRoute
metadata:
name: web
spec:
parentRefs: [{ name: edge }]
hostnames: ['web.local']
rules:
- backendRefs: [{ name: web, port: 80 }]
Terminal window
kubectl get gateway edge -o jsonpath='{range .status.conditions[*]}{.type}={.status} {.reason}{"\n"}{end}'
kubectl get httproute web -o jsonpath='{range .status.parents[*].conditions[*]}{.type}={.status} {.reason}{"\n"}{end}'

Healthy output shows Accepted=True and Programmed=True on the Gateway, and Accepted=True and ResolvedRefs=True on the route.

You created an Ingress, and kubectl describe shows no events at all. What's the likely cause?

No controller claimed it. Usually the ingressClassName doesn’t match an installed controller, or no controller is installed.

503 versus 502 at the edge: which usually means no Ready endpoints?
  1. A 502 usually means a pod was reached but the connection or protocol failed.
An HTTPRoute references a Service in another namespace and shows RefNotPermitted. What's missing?

A ReferenceGrant in the Service’s namespace that allows HTTPRoutes from the route’s namespace to reference it.

Maps to: CKA: Services and Networking. Check the current exam curriculum, since domain names change between revisions.