> ## Documentation Index
> Fetch the complete documentation index at: https://notes.kodekloud.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Status Fields and Conditions

> Explains Gateway API status fields and conditions for diagnosing Kubernetes resources by interpreting type, status, reason, and message to troubleshoot configuration, attachments, and controller issues.

This lesson explains the status fields exposed by the [Gateway API](https://gateway-api.sigs.k8s.io/) that help you verify a resource's state and troubleshoot attachment issues.

Kubernetes CLI output is useful, but Gateway API status fields provide structured, controller-level details that make diagnosing configuration and runtime problems easier.

<Frame>
  <img src="https://mintcdn.com/kodekloud-c4ac6d9a/QZ7pWzRtYdnRAGco/images/Gateway-API-with-NGINX-Fabric-Gateway/Troubleshooting-and-Best-Practices/Status-Fields-and-Conditions/status-fields-traditional-vs-gateway-api.jpg?fit=max&auto=format&n=QZ7pWzRtYdnRAGco&q=85&s=ec9cea8b806733ac2dfc3d533766eb02" alt="A presentation slide titled &#x22;Status Fields&#x22; comparing two approaches: a left orange box for &#x22;Traditional Workflow&#x22; with bullets about CLI familiarity and standard outputs, and a right green box for &#x22;GateWay API Advantages&#x22; listing extra fields, easier troubleshooting, and verification of resource creation. The two columns are numbered 1 and 2 and styled with colored headers." width="1920" height="1080" data-path="images/Gateway-API-with-NGINX-Fabric-Gateway/Troubleshooting-and-Best-Practices/Status-Fields-and-Conditions/status-fields-traditional-vs-gateway-api.jpg" />
</Frame>

Conditions

Conditions are one of the most actionable pieces of information in Gateway API status. Every Gateway API resource includes a `conditions` array under `status`. Each element in this array reports a specific aspect of the resource's state and contains fields that help explain what's happening.

Key fields inside each condition:

| Field | Purpose | Example |
| - | - | - |
| `type` | Which aspect of the resource is being reported (stage or facet). | `Accepted` |
| `status` | Whether that aspect is true, false, or unknown. | `True` |
| `reason` | Short CamelCase token identifying why the status was set. | `InvalidParameters` |
| `message` | Human-readable explanation with contextual details. | `"Accepted by gateway-controller"` |

<Callout icon="lightbulb" color="#1CB2FE">
  Conditions are most useful when combined with resource specs, Kubernetes events, and controller logs. Treat them as directional clues to guide further investigation rather than the single source of truth.
</Callout>

Type

The `type` field indicates the facet or step the condition describes. Knowing which types are present — and their `status` — narrows down where the controller is failing or succeeding.

Common `type` values you’ll see:

* `Accepted` — The controller validated the resource and accepted the configuration.
* `Programmed` — Configuration is being (or has been) pushed from control plane to data plane.
* `ResolvedRefs` — References to other Kubernetes objects (for example, `Secrets` or `Services`) were validated and resolved.

Each `type` represents a stage or validation point; inspect the corresponding `status`, `reason`, and `message` to localize issues.

<Frame>
  <img src="https://mintcdn.com/kodekloud-c4ac6d9a/QZ7pWzRtYdnRAGco/images/Gateway-API-with-NGINX-Fabric-Gateway/Troubleshooting-and-Best-Practices/Status-Fields-and-Conditions/conditions-type-field-accepted-programmed-resolvedrefs.jpg?fit=max&auto=format&n=QZ7pWzRtYdnRAGco&q=85&s=203886a58a772d7e3df234ace34c3787" alt="A presentation slide titled &#x22;Conditions: The 'Type' Field&#x22; showing four condition fields (Type, Status, Reason, Message) with example condition types like &#x22;Accepted,&#x22; &#x22;Programmed,&#x22; and &#x22;ResolvedRefs&#x22; and brief descriptions beneath them." width="1920" height="1080" data-path="images/Gateway-API-with-NGINX-Fabric-Gateway/Troubleshooting-and-Best-Practices/Status-Fields-and-Conditions/conditions-type-field-accepted-programmed-resolvedrefs.jpg" />
</Frame>

Status

The `status` subfield is one of `True`, `False`, or `Unknown`. It summarizes whether the condition passed, failed, or could not be determined.

* `True` — The check passed (e.g., the controller accepted the configuration).
* `False` — The check failed; further investigation is required (inspect `reason`, `message`, related resources, events, and controller logs).
* `Unknown` — The controller could not determine the state (often transient or a control-plane communication problem).

<Frame>
  <img src="https://mintcdn.com/kodekloud-c4ac6d9a/QZ7pWzRtYdnRAGco/images/Gateway-API-with-NGINX-Fabric-Gateway/Troubleshooting-and-Best-Practices/Status-Fields-and-Conditions/conditions-status-true-false-unknown.jpg?fit=max&auto=format&n=QZ7pWzRtYdnRAGco&q=85&s=bbceddb10e73e6bfdbfcfdbba3afaaea" alt="The image is a slide titled &#x22;Conditions: The 'Status' Field&#x22; showing four fields — Type, Status, Reason, and Message — with icons above and a breakdown of status values (True, False, Unknown) and brief explanations for each. It appears to be a diagram explaining possible condition outcomes and their meanings." width="1920" height="1080" data-path="images/Gateway-API-with-NGINX-Fabric-Gateway/Troubleshooting-and-Best-Practices/Status-Fields-and-Conditions/conditions-status-true-false-unknown.jpg" />
</Frame>

<Callout icon="warning" color="#FF6B6B">
  If you see `status: "False"` or `status: "Unknown"`, always check the `reason` and `message` first, then validate referenced Kubernetes objects (for example, `Secrets` and `Services`) and controller logs to identify the root cause.
</Callout>

Reason

The `reason` is a concise, machine-friendly token (typically CamelCase) that identifies why the controller set the `status` the way it did. Controllers and the Gateway API define common reason values; reading the reason points you to the exact validation or runtime check that failed.

Common reasons:

* `InvalidParameters`
* `UnsupportedValue`
* `InvalidListener`
* `NoMatchingParent`

Message

The `message` field is human-readable and provides additional context beyond the `reason`. When you combine `type`, `status`, `reason`, and `message`, you get a clearer picture of the problem and hints about what to check next. Example success messages include `RouteAccepted` or `GatewayProgrammed`.

Quick troubleshooting actions by `reason`:

| Reason | Likely cause | Recommended checks |
| - | - | - |
| `InvalidParameters` | Spec fields contain invalid values | Validate resource spec against Gateway API docs and controller docs |
| `UnsupportedValue` | Controller or dataplane doesn't support the requested feature | Check controller/version capability matrix and upgrade or change config |
| `InvalidListener` | Listener config (e.g., TLS, ports) is incorrect | Inspect `listeners` in the Gateway spec and referenced `Secrets` |
| `NoMatchingParent` | Route cannot find a parent Gateway or matching attachment | Confirm `parentRefs` and `Gateway` selectors/namespaces |

How to view conditions

Use `kubectl` to inspect a resource's status and its conditions. Example — view a Gateway in YAML form:

```bash theme={null}
kubectl get gateway my-gateway -n my-namespace -o yaml
```

You will see a `status.conditions` list similar to this example:

```yaml theme={null}
status:
  conditions:
    - type: Accepted
      status: "True"
      reason: RouteAccepted
      message: "Accepted by gateway-controller"
    - type: Programmed
      status: "True"
      reason: GatewayProgrammed
      message: "Configuration pushed to data plane"
    - type: ResolvedRefs
      status: "True"
      reason: ResolvedRefs
      message: "All references resolved successfully"
```

When a condition shows `status: "False"`, examine the `reason` and `message`, then check related objects such as `Secrets` and `Services`, controller logs, and Kubernetes events to identify and fix the underlying issue.

Conclusion

Gateway API conditions provide structured, actionable information that simplifies troubleshooting. Always interpret `type`, `status`, `reason`, and `message` together, and corroborate the condition details with events, controller logs, and the resource spec to resolve problems efficiently.

Resources and references

* [Gateway API documentation](https://gateway-api.sigs.k8s.io/)
* [Kubernetes: kubectl overview](https://kubernetes.io/docs/reference/kubectl/overview/)
* [Kubernetes: Secrets](https://kubernetes.io/docs/concepts/configuration/secret/)
* [Kubernetes: Services](https://kubernetes.io/docs/concepts/services-networking/service/)
* [Kubernetes: Events](https://kubernetes.io/docs/concepts/cluster-administration/events/)

I hope you found this lesson helpful.

<CardGroup>
  <Card title="Watch Video" icon="video" cta="Learn more" href="https://learn.kodekloud.com/user/courses/gateway-api-with-nginx-fabric-gateway/module/b9d41803-a9de-4c4e-aa9c-4c99854d493d/lesson/f6aeae22-9be7-4ecc-b806-858e6d94cdf6" />
</CardGroup>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.