MeshService Resource Configuration
This topic provides full details about the
MeshService is a resource in the Kubernetes cluster that enables Kubernetes configuration models, such as
TCPRoute, to reference services that only exist in Consul.
MeshService represents a service in the Consul service mesh outside the Kubernetes cluster where Consul API Gateway is deployed.
The service represented by the
MeshService resource must either be in the same Consul datacenter as the Kubernetes cluster or imported from a peered Consul cluster.
The following outline shows how to format the configurations in the
MeshService object. Click on a property name to view details about the configuration.
This topic provides details about the configuration parameters.
Specifies the name of the service in the Consul service mesh to send traffic to.
- Type: string
- Required: required
Specifies the name of the peered Consul cluster that exported the service. If not specified, Consul defaults to the local datacenter.
You must apply a
ServiceResolver for the referenced service. The
ServiceResolver configuration entry enables Consul to resolve routes to upstream service instances.
- Type: string
- Required: optional
The following example creates a mesh service called
example-mesh-service. Routes that use
example-mesh-service as a backend route traffic to the Consul service in the local datacenter named
apiVersion: api-gateway.consul.hashicorp.com/v1alpha1 kind: MeshService metadata: name: example-mesh-service spec: name: echo