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 or Pods is possible via spec.serviceTemplate and spec.podTemplate.
For example, you can add annotations and/or labels to the generated objects:
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 : ...
podTemplate :
metadata :
labels :
app-name : my-app
...
You can also modify several security-related parameters for the generated Pods or specify a loadBalancerIP for the Service:
spec :
replicas : 1
serviceType : LoadBalancer
tags :
kuma.io/service : edge-gateway
resources :
limits : ...
requests : ...
serviceTemplate :
metadata :
labels :
svc-id : " 19-001"
spec :
loadBalancerIP : ...
podTemplate :
metadata :
annotations :
app-monitor : " false"
spec :
serviceAccountName : my-sa
securityContext :
fsGroup : ...
container :
securityContext :
readOnlyRootFilesystem : true
See also
Schema
APIVersion defines the versioned schema of this representation of an object. Servers should convert ...
show more
Kind is a string value representing the REST resource this object represents. Servers may infer this...
show more
MeshGatewayInstanceSpec specifies the options available for a GatewayDataplane.
PodTemplate configures the Pod owned by this config.
Metadata holds metadata configuration for a Service.
Annotations holds annotations to be set on an object.
Labels holds labels to be set on an objects.
Spec holds some customizable fields of a Pod.
Container corresponds to PodSpec.Container
ContainerSecurityContext corresponds to PodSpec.Container.SecurityContext
ReadOnlyRootFilesystem corresponds to PodSpec.Container.SecurityContext.ReadOnlyRootFilesystem
PodSecurityContext corresponds to PodSpec.SecurityContext
FSGroup corresponds to PodSpec.SecurityContext.FSGroup
ServiceAccountName corresponds to PodSpec.ServiceAccountName.
Replicas is the number of dataplane proxy replicas to create. For now this is a fixed number, but in...
show more
Default: 1
Resources specifies the compute resources for the proxy container. The default can be set in the con...
show more
Claims lists the names of resources, defined in spec.resourceClaims, that are used by this container...
show more
Name must match the name of one entry in pod.spec.resourceClaims of the Pod where this field is used...
show more
Limits describes the maximum amount of compute resources allowed. More info: https://kubernetes.io/d...
show more
Requests describes the minimum amount of compute resources required. If Requests is omitted for a co...
show more
ServiceTemplate configures the Service owned by this config.
Metadata holds metadata configuration for a Service.
Annotations holds annotations to be set on an object.
Labels holds labels to be set on an objects.
Spec holds some customizable fields of a Service.
LoadBalancerIP corresponds to ServiceSpec.LoadBalancerIP.
ServiceType specifies the type of managed Service that will be created to expose the dataplane proxi...
show more
Values: LoadBalancer | ClusterIP | NodePort
Default: "LoadBalancer"
Tags specifies the Kuma tags that are propagated to the managed dataplane proxies. These tags should...
show more
MeshGatewayInstanceStatus holds information about the status of the gateway instance.
Conditions is an array of gateway instance conditions.
lastTransitionTime is the last time the condition transitioned from one status to another. This shou...
show more
message is a human readable message indicating details about the transition. This may be an empty st...
show more
observedGeneration represents the .metadata.generation that the condition was set based upon. For in...
show more
reason contains a programmatic identifier indicating the reason for the condition's last transition....
show more
status of the condition, one of True, False, Unknown.
Values: True | False | Unknown
type of condition in CamelCase or in foo.example.com/CamelCase. --- Many .condition.type values are ...
show more
LoadBalancer contains the current status of the load-balancer, if one is present.
Ingress is a list containing ingress points for the load-balancer. Traffic intended for the service ...
show more
Hostname is set for load-balancer ingress points that are DNS based (typically AWS load-balancers)
IP is set for load-balancer ingress points that are IP based (typically GCE or OpenStack load-balanc...
show more
IPMode specifies how the load-balancer IP behaves, and may only be specified when the ip field is sp...
show more
Ports is a list of records of service ports If used, every port defined in the service should have a...
show more
Error is to record the problem with the service port The format of the error shall comply with the f...
show more
Port is the port number of the service port of which status is recorded here
Protocol is the protocol of the service port of which status is recorded here The supported values a...
show more
Default: "TCP"