Consul
Configuration
This topic provides an overview of the configuration items that enable Consul API Gateway to manage traffic into your Consul service mesh.
- Gateway defines the main infrastructure resource that links API gateway components. It specifies the name of the
GatewayClass
and one or more listeners, which specify the logical endpoints bound to the gateway's addresses. - GatewayClass defines a class of gateway resources that you can use as a template for creating gateways.
- GatewayClassConfig describes additional Consul API Gateway-related configuration parameters for the GatewayClass resource.
- Routes specifies the path from the gateway to the backend service(s) client to the listener.
You can create a basic Gateway object using the default gatewayClassName
(consul-api-gateway
). If you want to create custom Gateways suitable for your environment, complete the following steps:
- Define a GatewayClassConfig that contains your custom configurations.
- Define a GatewayClass and configure the
parametersRef.name
to reference the name of your GatewayClassConfig. - Define a Gateway and configure the
gatewayClassName
to reference the name of your GatewayClass.