> ## Documentation Index
> Fetch the complete documentation index at: https://datum-4926dda5-docs-api-reference-demo.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# GatewayClass

> GatewayClass describes a class of Gateways available for creating Gateway resources.

<Note>
  **Platform-provided resource.** Datum operates this resource; you typically reference or read it rather than create it. See [Platform resources](/api/platform/overview).
</Note>

<Note>
  API resource reference for **GatewayClass**. See [Platform resources](/api/platform/overview) for related platform-provided resources. A [Gateway](/api/networking/gateway/gateway) selects the class it is based on. To read or inspect, see [Reading resources](/datumctl/resources/reading).
</Note>

<Info>
  `GatewayClass` follows the [Gateway API GatewayClass specification](https://gateway-api.sigs.k8s.io/reference/api-types/gatewayclass/), an open, portable standard for service traffic routing.
</Info>

## Identity

|         |                             |
| ------- | --------------------------- |
| Group   | `gateway.networking.k8s.io` |
| Version | `v1`                        |
| Kind    | `GatewayClass`              |
| Scope   | Platform                    |

## Overview

A `GatewayClass` defines a class of Gateways that you can use to create `Gateway` resources within Datum Cloud. It names the controller responsible for managing Gateways of the class and can carry default configuration parameters that those Gateways inherit.

Because it is Platform-scoped, a `GatewayClass` is shared across the platform rather than owned by a single Project. A `Gateway` is typically based on the state of its `GatewayClass` at creation time, so later changes to the class are not necessarily propagated to existing Gateways. This limits the blast radius of changes to a class or its parameters.

## Spec fields

| Field                          | Type   | Required | Description                                                                                                                                               |
| ------------------------------ | ------ | -------- | --------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `spec.controllerName`          | string | Yes      | Name of the controller managing Gateways of this class, as a domain-prefixed path (e.g. `example.net/gateway-controller`). Immutable and cannot be empty. |
| `spec.description`             | string | No       | Free-form text describing the GatewayClass.                                                                                                               |
| `spec.parametersRef`           | Object | No       | Reference to a resource holding configuration parameters for this class. Optional when the controller needs no extra configuration.                       |
| `spec.parametersRef.group`     | string | Yes      | Group of the referenced resource.                                                                                                                         |
| `spec.parametersRef.kind`      | string | Yes      | Kind of the referenced resource.                                                                                                                          |
| `spec.parametersRef.name`      | string | Yes      | Name of the referenced resource.                                                                                                                          |
| `spec.parametersRef.namespace` | string | No       | Project of the referenced resource. Required for a Project-scoped referent; must be unset for a Platform-scoped referent.                                 |

## Status fields (read-only)

| Field               | Type      | Description                                                                                            |
| ------------------- | --------- | ------------------------------------------------------------------------------------------------------ |
| `status.conditions` | \[]Object | Current status reported by the controller for this GatewayClass, such as whether it has been Accepted. |

## Usage

```yaml theme={null}
apiVersion: gateway.networking.k8s.io/v1
kind: GatewayClass
metadata:
  name: datum-external
spec:
  controllerName: gateway.networking.datum.net/gateway-controller
```

```bash theme={null}
datumctl apply -f gatewayclass.yaml --project my-project
datumctl get gatewayclasses --project my-project
datumctl describe gatewayclass datum-external --project my-project
```

<Tip>
  Run `datumctl explain gatewayclasses --recursive` to see the full, live field tree for this resource.
</Tip>
