Kubernetes Gateway API HTTPRoute troubleshooting cheat sheet
Inspect Gateway and HTTPRoute conditions, listener attachment and Service backends when HTTP traffic fails.
Kubernetes cluster with Gateway API resources installed and a Gateway implementation. Resource versions and supported features vary by implementation.
Updated · Kubernetes · 6 min read
| Command | What it does |
|---|---|
kubectl config current-context | Confirm the cluster context |
kubectl get gatewayclass | Inspect available GatewayClasses |
kubectl describe gateway edge -n production | Inspect Gateway listeners and status |
kubectl describe httproute web-route -n production | Inspect route attachment and references |
kubectl get service web -n production -o wide | Inspect the backend Service |
kubectl get endpointslice -n production -l kubernetes.io/service-name=web | Inspect backend EndpointSlices |
Walkthrough
Replace production, edge, web and web-route with your resources. Use authorized read access to the relevant namespaces. These commands do not modify routes or workloads.
Step 1: Confirm the cluster context
kubectl config current-context
Compare the local context with the approved cluster inventory. A similarly named context can point to another environment, so establish the target before interpreting routing resources.
Step 2: Inspect available GatewayClasses
kubectl get gatewayclass
Record the class used by the Gateway and its accepted condition. An accepted class alone does not prove that a particular listener or HTTPRoute is programmed or serving requests.
Step 3: Inspect Gateway listeners and status
kubectl describe gateway edge -n production
Read listener ports, allowed route namespaces, addresses and status conditions. Compare observed generation and condition messages with the current resource specification.
Step 4: Inspect route attachment and references
kubectl describe httproute web-route -n production
Read parent status, Accepted and ResolvedRefs conditions and their reasons. A route can be accepted by one parent but not another; check the relevant controller and parent entry.
Step 5: Inspect the backend Service
kubectl get service web -n production -o wide
Compare the HTTPRoute backend reference and port with the actual Service. A valid reference does not establish that the backend has ready endpoints or that the application responds.
Step 6: Inspect backend EndpointSlices
kubectl get endpointslice -n production -l kubernetes.io/service-name=web
Compare backend addresses and ports with the intended Service and pod readiness. An empty or unready endpoint set is a separate problem from route acceptance.
WORKED INCIDENT
Practical case: An HTTPRoute is accepted but requests fail
Fictional teaching scenario; observations are examples, not captured production output.
Situation
A new Gateway API route appears accepted, but clients receive backend errors.
Investigation sequence
1. Confirm the cluster context
kubectl config current-contextConfirm the intended cluster and namespace before examining resources.
2. Inspect Gateway listeners and status
kubectl describe gateway edge -n productionCheck the intended Gateway listener and its current conditions.
3. Inspect route attachment and references
kubectl describe httproute web-route -n productionInspect the route parent entry and resolved reference conditions.
4. Inspect the backend Service
kubectl get service web -n production -o wideCompare the configured backend reference with the actual Service.
5. Inspect backend EndpointSlices
kubectl get endpointslice -n production -l kubernetes.io/service-name=webInspect the backend EndpointSlices for ready addresses.
Example findings
Illustrative findings: the route is accepted and references resolve, but the backend Service has no ready endpoints.
Interpret the findings
The empty backend set supports an application or Service readiness investigation. Accepted route status alone does not establish that requests can reach a healthy backend.
Verify the outcome
After the workload owner restores ready backends, repeat the conditions and EndpointSlice checks and test the authorized HTTP route.
Escalation handoff
Provide cluster, Gateway and route names, relevant condition reasons and sanitized backend state to the platform owner.
Primary references
Documented reference; examples above are teaching scenarios. Confirm behavior against your deployed version.