Careful!
You are browsing documentation for a version of Kuma that is not the latest release.
MeshGatewayInstance
MeshGatewayInstance
is a Kubernetes-only resource for deploying Kuma’s builtin gateway.
MeshGateway
and MeshGatewayRoute
allow specifying builtin gateway
listener and route configuration but don’t handle deploying kuma-dp
instances that listen and serve traffic.
Kuma offers MeshGatewayInstance
to manage a Kubernetes Deployment
and Service
that together provide service capacity for the MeshGateway
with the matching kuma.io/service
tag.
If you’re not using the default
Mesh
, you’ll need to label the
MeshGatewayInstance
using kuma.io/mesh
.
Consider the following example:
apiVersion: kuma.io/v1alpha1
kind: MeshGatewayInstance
metadata:
name: edge-gateway
namespace: default
labels:
kuma.io/mesh: default # only necessary if not using default Mesh
spec:
replicas: 2
serviceType: LoadBalancer
tags:
kuma.io/service: edge-gateway
Once a MeshGateway
exists with kuma.io/service: edge-gateway
, the control plane creates a new Deployment
in the default
namespace.
This Deployment
deploys 2 replicas of kuma-dp
and corresponding builtin gateway Dataplane
running with kuma.io/service: edge-gateway
.
The control plane also creates a new Service
to send network traffic to the builtin Dataplane
pods.
The Service
is of type LoadBalancer
, and its ports are automatically adjusted to match the listeners on the corresponding MeshGateway
.
Customization
Additional customization of the generated Service
is possible via spec.serviceTemplate
. For example, you can add annotations to the generated Service
, and specify the loadBalancerIP
:
spec:
replicas: 1
serviceType: LoadBalancer
tags:
kuma.io/service: edge-gateway
resources:
limits: ...
requests: ...
serviceTemplate:
metadata:
annotations:
service.beta.kubernetes.io/aws-load-balancer-internal: "true"
...
spec:
loadBalancerIP: ...