Careful!

You are browsing documentation for the next version of Kuma. Use this version at your own risk.

MeshMultiZoneService

MeshMultiZoneService groups multiple MeshService resources across zones into a single addressable destination. While MeshService represents a service in a specific zone, MeshMultiZoneService aggregates services from multiple zones and provides zone-agnostic hostnames for cross-zone load balancing.

Kuma automatically assigns virtual IPs and generates hostnames for each MeshMultiZoneService. Traffic sent to these addresses is load balanced across all matching MeshServices, with preference for the local zone when available.

For usage patterns and migration guidance, see the MeshMultiZoneService guide.

Spec fields

Field Description
selector Defines which MeshServices to group together. Required.
selector.meshService Label selector matching MeshServices across zones. Required.
selector.meshService.matchLabels Map of label key-value pairs. All labels must match. Common labels: kuma.io/display-name, k8s.kuma.io/namespace, kuma.io/zone.
ports List of ports exposed by this multi-zone service (minimum 1 required).
ports[].port Port number exposed by the service (required).
ports[].name Optional port name for referencing in policies.
ports[].appProtocol Protocol hint: tcp (default), http, http2, grpc.

Examples

Basic MeshMultiZoneService

Group all MeshServices named redis across zones:

apiVersion: kuma.io/v1alpha1
kind: MeshMultiZoneService
metadata:
  name: redis
  namespace: kuma-system
  labels:
    kuma.io/mesh: default
spec:
  selector:
    meshService:
      matchLabels:
        kuma.io/display-name: redis
  ports:
    - port: 6379
      appProtocol: tcp

MeshMultiZoneService with namespace selector

Select services from a specific namespace across all zones:

apiVersion: kuma.io/v1alpha1
kind: MeshMultiZoneService
metadata:
  name: backend
  namespace: kuma-system
  labels:
    kuma.io/mesh: default
spec:
  selector:
    meshService:
      matchLabels:
        kuma.io/display-name: backend
        k8s.kuma.io/namespace: prod
  ports:
    - port: 8080
      appProtocol: http

MeshMultiZoneService with multiple ports

Expose multiple ports from the same service:

apiVersion: kuma.io/v1alpha1
kind: MeshMultiZoneService
metadata:
  name: webapp
  namespace: kuma-system
  labels:
    kuma.io/mesh: default
spec:
  selector:
    meshService:
      matchLabels:
        kuma.io/display-name: webapp
  ports:
    - name: http
      port: 8080
      appProtocol: http
    - name: metrics
      port: 9090
      appProtocol: http

MeshMultiZoneService with zone selector

Select services only from specific zones:

apiVersion: kuma.io/v1alpha1
kind: MeshMultiZoneService
metadata:
  name: regional-service
  namespace: kuma-system
  labels:
    kuma.io/mesh: default
spec:
  selector:
    meshService:
      matchLabels:
        kuma.io/display-name: api
        kuma.io/zone: us-east
  ports:
    - port: 443
      appProtocol: http2

See also

All options

apiVersion string
APIVersion defines the versioned schema of this representation of an object. Servers should convert ...
kind string
Kind is a string value representing the REST resource this object represents. Servers may infer this...
metadata object
spec object
Spec is the specification of the Kuma MeshMultiZoneService resource.
Ports is a list of ports from selected MeshServices
appProtocol string
Protocol identifies a protocol supported by a service.
Default: "tcp"
name string
port integer required
Selector is a way to select multiple MeshServices
MeshService selects MeshServices
matchLabels object
status object
Status is the current status of the Kuma MeshMultiZoneService resource.
Addresses is a list of addresses generated by HostnameGenerator
hostname string
coreName string required
origin string
Conditions is an array of current conditions
message string required
message is a human readable message indicating details about the transition. This may be an empty st...
reason string required
reason contains a programmatic identifier indicating the reason for the condition's last transition....
status enum required
status of the condition, one of True, False, Unknown.
Values: True | False | Unknown
type string required
type of condition in CamelCase or in foo.example.com/CamelCase.
Status of hostnames generator applied on this resource
Conditions is an array of hostname generator conditions.
message string required
message is a human readable message indicating details about the transition. This may be an empty st...
reason string required
reason contains a programmatic identifier indicating the reason for the condition's last transition....
status enum required
status of the condition, one of True, False, Unknown.
Values: True | False | Unknown
type string required
type of condition in CamelCase or in foo.example.com/CamelCase.
coreName string required
MeshServices is a list of matched MeshServices
mesh string required
name string required
Name is a core name of MeshService
namespace string required
zone string required
VIPs is a list of assigned Kuma VIPs.
ip string