Sub topic 15
Verifying status and behavior before cutover
This chapter assumes you can read Gateway API YAML, use kubectl, and have a Gateway and HTTPRoutes applied next to your running Ingress NGINX setup. Verification has two parts. First you check what the controller reports in resource status. Then you send real requests to the new data path while DNS still points at the old one.
Read the status conditions
The Gateway API controller writes the outcome of its work into each resource's status. A manifest that applies cleanly can still be ignored. The API server only checks the schema. It does not check that the controller accepted your configuration.
Start with the draft from the previous chapter, then inspect the results:
kubectl apply --dry-run=server -f gateway-draft.yaml
kubectl get gateway,httproute -A
kubectl describe httproute app -n shop
kubectl describe gateway shared-gateway -n gateway-systemLook at these conditions:
| Resource | Condition | Healthy value | What a failure usually means |
|---|---|---|---|
| Gateway | `Accepted` | True | The `gatewayClassName` is wrong or the class is not installed. |
| Gateway | `Programmed` | True | The data plane or load balancer is not ready. |
| Listener | `ResolvedRefs` | True | The certificate Secret is missing, or a cross-namespace reference has no ReferenceGrant. |
| HTTPRoute | `Accepted` | True | The `parentRefs` entry, `sectionName`, hostname, or `allowedRoutes` rule does not match the Gateway. |
| HTTPRoute | `ResolvedRefs` | True | A backend Service or port does not exist, or a reference is not allowed. |
The reason and message fields name the exact problem. Read them before changing anything.
Test behavior before DNS changes
Healthy status shows that the configuration was accepted. It does not show that requests behave like they did on Ingress. Find the new Gateway address and send requests to it directly. Use --resolve so the hostname and TLS name are correct:
GW_IP=$(kubectl get gateway shared-gateway -n gateway-system \
-o jsonpath='{.status.addresses[0].value}')
curl -sSI --resolve app.example.com:443:$GW_IP https://app.example.com/
curl -sS --resolve app.example.com:443:$GW_IP https://app.example.com/api/health
curl -sSI --resolve app.example.com:80:$GW_IP http://app.example.com/If the address is a hostname rather than an IP, resolve it first and use the result.
Compare each result with the same request sent to the old controller. Check these points:
- The HTTPS certificate is the expected one.
/apiand/reach the right backends.- HTTP returns the 301 redirect to HTTPS.
- Weighted routes split traffic roughly as configured over many requests.
- Any behavior that used an NGINX annotation, such as timeouts, body size limits, or rewrites, still works.
The last point is where migrations most often break. Annotations with no portable equivalent are dropped silently by conversion tools.
Exercise
An HTTPRoute shows Accepted=True but ResolvedRefs=False. Name two likely causes.
Show answer
A backend Service name or port does not exist, or the route references an object in another namespace without a ReferenceGrant.