Skip to main content
In this lesson we walk through five common Gateway API troubleshooting scenarios using the NGINX Gateway Fabric. For each case you’ll see the observable symptom, how to inspect status fields and controller messages, the root cause, and the corrective steps to verify the fix.
A presentation slide showing the title "The Power of Status Fields" on the left and a large turquoise curved shape on the right with the word "Demo" inside it. A small "© Copyright KodeKloud" note appears in the lower-left corner.

Summary of scenarios Useful references:

Scenario 1 — Gateway exists but shows no address / Programmed = Unknown

Symptom: After applying a Gateway manifest the ADDRESS field is empty and PROGRAMMED remains Unknown. Inspect the files and object:
Check GatewayClass and controller status:
Root cause: the Gateway is referencing the wrong class name (ngin) so the controller does not adopt or program it. Fix: update gateway.yaml to use the correct spec.gatewayClassName (e.g. nginx) and reapply:
Verify the Gateway is now programmed and has an address:

Scenario 2 — HTTPRoute applied but Gateway shows “Attached Routes: 0”

Symptom: An HTTPRoute exists, but the Gateway’s listener shows Attached Routes: 0. Check the route:
Describe the Gateway (note Attached Routes: 0):
Describe the HTTPRoute to inspect parentRefs and status:
Root cause: a typo in parentRefs.name (gatew instead of gateway) — the controller cannot associate the HTTPRoute with the Gateway, so attachment and parent status are missing. Fix: correct parentRefs.name in coffee-route.yaml to the Gateway name (gateway) and reapply:
Verify status now includes parent conditions and the Gateway shows the attached route:

Scenario 3 — TLS: Gateway can’t access Secret in another namespace (ReferenceGrant needed)

Symptom: Gateway’s HTTPS listener fails to resolve the TLS secret and shows:
Inspect namespaces, Secrets and Gateway:
Describe the Gateway to see TLS certificate reference and the error:
Root cause: Gateways in the default namespace cannot reference a Secret in the certificate namespace by default. The Gateway API requires an explicit ReferenceGrant in the Secret’s namespace to allow cross-namespace references. Fix: Create a ReferenceGrant in the Secret namespace (certificate) that allows the Gateway to reference the Secret. Example manifest (ref-grant.yaml):
Apply it:
Verify the Gateway listener conditions are resolved and programmed:
Note: alternatively, place the TLS Secret in the same namespace as the Gateway to avoid needing a ReferenceGrant. When cross-namespace references are required, ReferenceGrant is the recommended approach.

Scenario 4 — 404 Not Found: route exists but you requested the wrong path

Symptom: Gateway and HTTPRoute are accepted, but client requests return 404 Not Found. Verify Service and Pods:
Inspect the HTTPRoute manifest:
The client requested a different path (/tea):
Root cause: The route only matches PathPrefix /coffee. Requests to /tea do not match and return 404. Fix options:
  • Use the correct path: request /coffee.
  • Or update the HTTPRoute to include additional matches for /tea or a broader prefix.
Example correct request:

Scenario 5 — 500 Internal Server Error: backend port mismatch (BackendNotFound)

Symptom: The HTTPRoute is attached and accepted, but requests return 500 Internal Server Error. Reproduce the symptom:
Describe the HTTPRoute and inspect backend references:
Check the Service ports:
Root cause: the HTTPRoute references port 808, but the Service exposes port 80. The controller cannot resolve the backend port, so NGINX cannot forward traffic and returns a 500. Fix: update the HTTPRoute backendRefs.port to match the Service port 80. Example before/after: Before (incorrect):
After (fixed):
Apply and verify:
Request should now succeed:

When troubleshooting Gateway API resources, start with status fields and controller messages — they are purposefully descriptive. Typical culprits are incorrect GatewayClass names, typos in parentRefs, missing ReferenceGrant for cross-namespace Secrets, mismatched service ports, or incorrect route paths. Isolate whether the issue is control plane (controller not adopting), data plane (NGINX config/backends), or client-side (wrong hostname/path), then fix manifests or permissions and reapply.

Watch Video

Practice Lab