--- layout: docs page_title: Consul API Gateway GatewayClass description: >- Consul API Gateway GatewayClass --- # GatewayClass This topic provides full details about the `GatewayClass` resource ## Introduction The `GatewayClass` resource is used as a template for creating `Gateway` resources. The specification includes the name of the controller (`controllerName`) and an API object containing controller-specific configuration resources within the cluster (`parametersRef`). The value of the `controllerName` field must be set to `hashicorp.com/consul-api-gateway-controller`. When gateways are created from a `GatewayClass`, they use the parameters specified in the `GatewayClass` at the time of instantiation. The `GatewayClass` resource is a generic Kubernetes gateway object. For configuration specific to Consul API Gateway, see [GatewayClassConfig](/docs/api-gateway/configuration/gatewayclassconfig). ## Configuration model The following outline shows how to format the configurations in the `GatewayClass` object. Click on a property name to view details about the configuration. * [`controllerName`](#controllername): string | required * [`parametersRef`](#parametersref): object | optional * [`group`]([#parametersref-group): string | required is `parametersRef` is set * [`kind`](#parametersref-kind): string | required is `parametersRef` is set * [`name`](#parametersref-name): string | required is `parametersRef` is set * [`description`](#description): string | optional ## Specification This topic provides details about the configuration parameters. ### controllerName Specifies the name of the controller that manages the gateways generated by this class. The value must alwasy be `'hashicorp.com/consul-api-gateway-controller'`. * Type: string * Required: required ### parametersRef Defines an object that specifies additional configurations required by the gateway controller. * Type: object * Required: required ### parametersRef.group Specifies the Kubernetes group that the `parametersRef` is a member of. The value must always be `api-gateway.consul.hashicorp.com`. The `parametersRef.group` is always the same across all deployments of Consul API Gateway. * Type: string * Required: required ### parametersRef.kind Specifies the Kubernetes kind of entity that the `parametersRef` is. The value must always be `GatewayClassConfig`. This `parametersRef.kind` is always the same across all deployments of Consul API Gateway. * Type: string * Required: required ### parametersRef.name Specfies the name of the `GatewayClassConfig` object. * Type: object * Required: required ### description Specifies a human-readable description of the gateway class. We recommend including a description so that a record exists that describes the gateway class's purpose. * Type: string * Required: optional ## Complete Configuration The following example creates a gateway class called `test-gateway-class`: ```yaml apiVersion: gateway.networking.k8s.io/v1alpha2 kind: GatewayClass metadata: name: test-gateway-class spec: controllerName: 'hashicorp.com/consul-api-gateway-controller' parametersRef: group: api-gateway.consul.hashicorp.com kind: GatewayClassConfig name: test-gateway-class-config ``` Refer to the [Kubernetes Gateway API documentation](https://gateway-api.sigs.k8s.io/v1alpha2/references/spec/#gateway.networking.k8s.io/v1alpha2.GatewayClass) for details about configuring gateway classes.