You are browsing documentation for an older version. See the latest documentation here.
MeshService
This resource is experimental. In Kubernetes, to take advantage of the automatic generation described below, you need to set both control plane configuration variables
KUMA_EXPERIMENTAL_SKIP_PERSISTED_VIPS
andKUMA_EXPERIMENTAL_GENERATE_MESH_SERVICES
to"true"
on the zone control planes that useMeshServices
.
MeshService is a new resource that represents what was previously expressed by
the Dataplane
tag kuma.io/service
. Kubernetes users should think about it as
the analog of a Kubernetes Service
.
A basic example follows to illustrate the structure:
The MeshService represents a destination for traffic from elsewhere in the mesh.
It defines which Dataplane
objects serve this traffic as well as what ports
are available. It also holds information about which IPs and hostnames can be used
to reach this destination.
Zone types
How users interact with MeshServices
will depend on the type of zone.
Kubernetes
On Kubernetes, Service
already provides a number of the features provided by
MeshService. For this reason, Kuma generates MeshServices
from Services
and:
- reuses VIPs in the form of cluster IPs
- uses Kubernetes DNS names
You need to set the
kuma.io/mesh
label on anyServices
from which aMeshService
should be generated.
In the vast majority of cases, Kubernetes users do not create MeshServices
.
Universal
In universal zones, MeshServices
need to be created manually for now. A
strategy of
automatically generating MeshService
objects from Dataplanes
is planned for
the future.
Hostnames
Because of various shortcomings, the existing VirtualOutbound
does not work
with MeshService
and is planned for phasing out. A new HostnameGenerator
resource was introduced to manage hostnames for
MeshServices
.
Ports
The ports
field lists the ports exposed by the Dataplanes
that
the MeshService
matches. targetPort
can refer to a port directly or by the
name of the Dataplane
port.
ports:
- name: redis-non-tls
port: 16739
targetPort: 6739
appProtocol: tcp