You are browsing documentation for an older version. See the latest documentation here.
MeshGatewayInstance
MeshGatewayInstance
is a Kubernetes-only resource for deploying Kong Mesh’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 theMeshGatewayInstance
usingkuma.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
Schema
MeshGatewayInstance represents a managed instance of a dataplane proxy for a Kuma Gateway.
Type: object
Properties
- apiVersion
- APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
- Type:
string
- kind
- Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
- Type:
string
- metadata
- Type:
object
- Properties
- Type:
- spec
- MeshGatewayInstanceSpec specifies the options available for a GatewayDataplane.
- Type:
object
- Properties
- podTemplate
- PodTemplate configures the Pod owned by this config.
- Type:
object
- Properties
- metadata
- Metadata holds metadata configuration for a Service.
- Type:
object
- Properties
- annotations
- Annotations holds annotations to be set on an object.
- Type:
object
- This schema accepts additional properties.
- Properties
- labels
- Labels holds labels to be set on an objects.
- Type:
object
- This schema accepts additional properties.
- Properties
- annotations
- spec
- Spec holds some customizable fields of a Pod.
- Type:
object
- Properties
- container
- Container corresponds to PodSpec.Container
- Type:
object
- Properties
- securityContext
- ContainerSecurityContext corresponds to PodSpec.Container.SecurityContext
- Type:
object
- Properties
- readOnlyRootFilesystem
- ReadOnlyRootFilesystem corresponds to PodSpec.Container.SecurityContext.ReadOnlyRootFilesystem
- Type:
boolean
- readOnlyRootFilesystem
- securityContext
- securityContext
- PodSecurityContext corresponds to PodSpec.SecurityContext
- Type:
object
- Properties
- fsGroup
- FSGroup corresponds to PodSpec.SecurityContext.FSGroup
- Type:
integer
- fsGroup
- serviceAccountName
- ServiceAccountName corresponds to PodSpec.ServiceAccountName.
- Type:
string
- container
- metadata
- replicas
- Replicas is the number of dataplane proxy replicas to create. For now this is a fixed number, but in the future it could be automatically scaled based on metrics.
- Type:
integer
- Default:
1
- Range: ≥ 1
- resources
- Resources specifies the compute resources for the proxy container. The default can be set in the control plane config.
- Type:
object
- Properties
- claims
- Claims lists the names of resources, defined in spec.resourceClaims, that are used by this container. This is an alpha field and requires enabling the DynamicResourceAllocation feature gate. This field is immutable. It can only be set for containers.
- Type:
array
- Items
- ResourceClaim references one entry in PodSpec.ResourceClaims.
- Type:
object
- Properties
- name
required
- Name must match the name of one entry in pod.spec.resourceClaims of the Pod where this field is used. It makes that resource available inside a container.
- Type:
string
- name
- limits
- Limits describes the maximum amount of compute resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/
- Type:
object
- This schema accepts additional properties.
- Properties
- requests
- Requests describes the minimum amount of compute resources required. If Requests is omitted for a container, it defaults to Limits if that is explicitly specified, otherwise to an implementation-defined value. Requests cannot exceed Limits. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/
- Type:
object
- This schema accepts additional properties.
- Properties
- claims
- serviceTemplate
- ServiceTemplate configures the Service owned by this config.
- Type:
object
- Properties
- metadata
- Metadata holds metadata configuration for a Service.
- Type:
object
- Properties
- annotations
- Annotations holds annotations to be set on an object.
- Type:
object
- This schema accepts additional properties.
- Properties
- labels
- Labels holds labels to be set on an objects.
- Type:
object
- This schema accepts additional properties.
- Properties
- annotations
- spec
- Spec holds some customizable fields of a Service.
- Type:
object
- Properties
- loadBalancerIP
- LoadBalancerIP corresponds to ServiceSpec.LoadBalancerIP.
- Type:
string
- loadBalancerIP
- metadata
- serviceType
- ServiceType specifies the type of managed Service that will be created to expose the dataplane proxies to traffic from outside the cluster. The ports to expose will be taken from the matching Gateway resource. If there is no matching Gateway, the managed Service will be deleted.
- Type:
string
- The value is restricted to the following:
- "LoadBalancer"
- "ClusterIP"
- "NodePort"
- Default: "LoadBalancer"
- tags
- Tags specifies the Kuma tags that are propagated to the managed dataplane proxies. These tags should include exactly one
kuma.io/service
tag, and should match exactly one Gateway resource. - Type:
object
- This schema accepts additional properties.
- Properties
- Tags specifies the Kuma tags that are propagated to the managed dataplane proxies. These tags should include exactly one
- podTemplate
- status
- MeshGatewayInstanceStatus holds information about the status of the gateway instance.
- Type:
object
- Properties
- conditions
- Conditions is an array of gateway instance conditions.
- Type:
array
- Items
- Condition contains details for one aspect of the current state of this API Resource. --- This struct is intended for direct use as an array at the field path .status.conditions. For example, type FooStatus struct{ // Represents the observations of a foo's current state. // Known .status.conditions.type are: "Available", "Progressing", and "Degraded" // +patchMergeKey=type // +patchStrategy=merge // +listType=map // +listMapKey=type Conditions []metav1.Condition
json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type" protobuf:"bytes,1,rep,name=conditions"
// other fields } - Type:
object
- Properties
- lastTransitionTime
required
- lastTransitionTime is the last time the condition transitioned from one status to another. This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable.
- Type:
string
- String format must be a "date-time"
- message
required
- message is a human readable message indicating details about the transition. This may be an empty string.
- Type:
string
- Length: ≤ 32768
- observedGeneration
- observedGeneration represents the .metadata.generation that the condition was set based upon. For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date with respect to the current state of the instance.
- Type:
integer
- Range: ≥ 0
- reason
required
- reason contains a programmatic identifier indicating the reason for the condition's last transition. Producers of specific condition types may define expected values and meanings for this field, and whether the values are considered a guaranteed API. The value should be a CamelCase string. This field may not be empty.
- Type:
string
- The value must match this pattern:
^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$
- Length: between 1 and 1024
- status
required
- status of the condition, one of True, False, Unknown.
- Type:
string
- The value is restricted to the following:
- "True"
- "False"
- "Unknown"
- type
required
- type of condition in CamelCase or in foo.example.com/CamelCase. --- Many .condition.type values are consistent across resources like Available, but because arbitrary conditions can be useful (see .node.status.conditions), the ability to deconflict is important. The regex it matches is (dns1123SubdomainFmt/)?(qualifiedNameFmt)
- Type:
string
- The value must match this pattern:
^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$
- Length: ≤ 316
- lastTransitionTime
- loadBalancer
- LoadBalancer contains the current status of the load-balancer, if one is present.
- Type:
object
- Properties
- ingress
- Ingress is a list containing ingress points for the load-balancer. Traffic intended for the service should be sent to these ingress points.
- Type:
array
- Items
- LoadBalancerIngress represents the status of a load-balancer ingress point: traffic intended for the service should be sent to an ingress point.
- Type:
object
- Properties
- hostname
- Hostname is set for load-balancer ingress points that are DNS based (typically AWS load-balancers)
- Type:
string
- ip
- IP is set for load-balancer ingress points that are IP based (typically GCE or OpenStack load-balancers)
- Type:
string
- ipMode
- IPMode specifies how the load-balancer IP behaves, and may only be specified when the ip field is specified. Setting this to "VIP" indicates that traffic is delivered to the node with the destination set to the load-balancer's IP and port. Setting this to "Proxy" indicates that traffic is delivered to the node or pod with the destination set to the node's IP and node port or the pod's IP and port. Service implementations may use this information to adjust traffic routing.
- Type:
string
- ports
- Ports is a list of records of service ports If used, every port defined in the service should have an entry in it
- Type:
array
- Items
- Type:
object
- Properties
- error
- Error is to record the problem with the service port The format of the error shall comply with the following rules: - built-in error values shall be specified in this file and those shall use CamelCase names - cloud provider specific error values must have names that comply with the format foo.example.com/CamelCase. --- The regex it matches is (dns1123SubdomainFmt/)?(qualifiedNameFmt)
- Type:
string
- The value must match this pattern:
^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$
- Length: ≤ 316
- port
required
- Port is the port number of the service port of which status is recorded here
- Type:
integer
- protocol
required
- Protocol is the protocol of the service port of which status is recorded here The supported values are: "TCP", "UDP", "SCTP"
- Type:
string
- Default: "TCP"
- error
- hostname
- ingress
- conditions
Generated with json-schema-md-doc