Skip to content
Kong Logo | Kong Docs Logo
  • Docs
    • Explore the API Specs
      View all API Specs View all API Specs View all API Specs arrow image
    • Documentation
      API Specs
      Kong Gateway
      Lightweight, fast, and flexible cloud-native API gateway
      Kong Konnect
      Single platform for SaaS end-to-end connectivity
      Kong AI Gateway
      Multi-LLM AI Gateway for GenAI infrastructure
      Kong Mesh
      Enterprise service mesh based on Kuma and Envoy
      decK
      Helps manage Kong’s configuration in a declarative fashion
      Kong Ingress Controller
      Works inside a Kubernetes cluster and configures Kong to proxy traffic
      Kong Gateway Operator
      Manage your Kong deployments on Kubernetes using YAML Manifests
      Insomnia
      Collaborative API development platform
  • Plugin Hub
    • Explore the Plugin Hub
      View all plugins View all plugins View all plugins arrow image
    • Functionality View all View all arrow image
      View all plugins
      AI's icon
      AI
      Govern, secure, and control AI traffic with multi-LLM AI Gateway plugins
      Authentication's icon
      Authentication
      Protect your services with an authentication layer
      Security's icon
      Security
      Protect your services with additional security layer
      Traffic Control's icon
      Traffic Control
      Manage, throttle and restrict inbound and outbound API traffic
      Serverless's icon
      Serverless
      Invoke serverless functions in combination with other plugins
      Analytics & Monitoring's icon
      Analytics & Monitoring
      Visualize, inspect and monitor APIs and microservices traffic
      Transformations's icon
      Transformations
      Transform request and responses on the fly on Kong
      Logging's icon
      Logging
      Log request and response data using the best transport for your infrastructure
  • Support
  • Community
  • Kong Academy
Get a Demo Start Free Trial
Kong Mesh
2.8.x
  • Home icon
  • Kong Mesh
  • Using Mesh
  • Managing Ingress Traffic
  • Running built-in gateway pods on Kubernetes
github-edit-pageEdit this page
report-issueReport an issue
  • Kong Gateway
  • Kong Konnect
  • Kong Mesh
  • Kong AI Gateway
  • Plugin Hub
  • decK
  • Kong Ingress Controller
  • Kong Gateway Operator
  • Insomnia
  • Kuma

  • Docs contribution guidelines
  • dev
  • 2.10.x (latest)
  • 2.9.x
  • 2.8.x
  • 2.7.x (LTS)
  • 2.6.x
  • 2.5.x
  • 2.4.x
  • 2.3.x
  • 2.2.x
  • Introduction
    • About service meshes
    • Overview of Kong Mesh
    • How Kong Mesh works
    • Architecture
    • Concepts
    • Stages of software availability
    • Version support policy
    • Software Bill of Materials
    • Mesh requirements
    • Release notes
  • Quickstart
    • Deploy Kong Mesh on Kubernetes
    • Deploy Kong Mesh on Universal
  • Kong Mesh in Production
    • Overview
    • Deployment topologies
      • Overview
      • Single-zone deployment
      • Multi-zone deployment
    • Install kumactl
    • Use Kong Mesh
    • Control plane deployment
      • Kong Mesh license
      • Deploy a single-zone control plane
      • Deploy a multi-zone global control plane
      • Zone Ingress
      • Zone Egress
      • Configure zone proxy authentication
      • Control plane configuration reference
      • Systemd
      • Kubernetes
      • kumactl
      • Deploy Kong Mesh in Production with Helm
    • Configuring your Mesh and multi-tenancy
    • Data plane configuration
      • Data plane proxy
      • Configure the data plane on Kubernetes
      • Configure the data plane on Universal
      • Configure the Kong Mesh CNI
      • Configure transparent proxying
      • IPv6 support
    • Secure your deployment
      • Manage secrets
      • Authentication with the API server
      • Authentication with the data plane proxy
      • Configure data plane proxy membership
      • Secure access across services
      • Kong Mesh RBAC
      • FIPS support
    • Kong Mesh user interface
    • Inspect API
      • Matched policies
      • Affected data plane proxies
      • Envoy proxy configuration
    • Upgrades and tuning
      • Upgrade Kong Mesh
      • Performance fine-tuning
      • Version specific upgrade notes
    • Control Plane Configuration
      • Modifying the configuration
      • Inspecting the configuration
      • Store
  • Using Kong Mesh
    • Zero Trust & Application Security
      • Mutual TLS
      • External Service
    • Resiliency & Failover
      • Dataplane Health
      • Service Health Probes
    • Managing incoming traffic with gateways
      • How ingress works in Kuma
      • Delegated gateways
      • Built-in gateways
      • Running built-in gateway pods on Kubernetes
      • Configuring built-in listeners
      • Configuring built-in routes
      • Using the Kubernetes Gateway API
    • Observability
      • Demo setup
      • Control plane metrics
      • Configuring Prometheus
      • Configuring Grafana
      • Configuring Datadog
      • Observability in multi-zone
    • Route & Traffic shaping
      • Protocol support in Kong Mesh
    • Service Discovery & Networking
      • Service Discovery
      • MeshService
      • HostnameGenerator
      • DNS
      • Non-mesh traffic
      • MeshExternalService
      • Transparent Proxying
  • Policies
    • Introduction
    • Applying Policies
    • Understanding TargetRef policies
    • MeshAccessLog
      • TargetRef support matrix
      • Configuration
      • Examples
    • MeshCircuitBreaker
      • TargetRef support matrix
      • Configuration
      • Examples
    • MeshFaultInjection
      • TargetRef support matrix
      • Configuration
      • Examples
    • MeshHealthCheck
      • TargetRef support matrix
      • Configuration
      • Examples
    • MeshHTTPRoute
      • TargetRef support matrix
      • Configuration
      • Examples
      • Merging
    • MeshMetric
      • TargetRef support matrix
      • Configuration
      • Prometheus
      • OpenTelemetry
      • Examples
    • MeshProxyPatch
      • TargetRef support matrix
      • Configuration
      • Examples
      • Merging
    • MeshRateLimit
      • TargetRef support matrix
      • Configuration
      • Examples
    • MeshRetry
      • TargetRef support matrix
      • Configuration
      • Examples
    • MeshTCPRoute
      • TargetRef support matrix
      • Configuration
      • Examples
      • Route policies with different types targeting the same destination
    • MeshTimeout
      • TargetRef support matrix
      • Configuration
      • Examples
    • MeshTrace
      • TargetRef support matrix
      • Configuration
      • Examples
    • MeshTrafficPermission
      • TargetRef support matrix
      • Configuration
      • Examples
    • MeshLoadBalancingStrategy
      • TargetRef support matrix
      • Configuration
      • Examples
    • MeshPassthrough
      • TargetRef support matrix
      • Configuration
      • Examples
    • MeshOPA
    • MeshGlobalRateLimit (beta)
    • Previous Policies
      • General notes about Kong Mesh policies
      • How Kong Mesh chooses the right policy to apply
      • Traffic Permissions
      • Traffic Route
      • Traffic Metrics
      • Traffic Trace
      • Traffic Log
      • Locality-aware Load Balancing
      • Fault Injection
      • Health Check
      • Circuit Breaker
      • Retry
      • Timeout
      • Rate Limit
      • Virtual Outbound
      • MeshGatewayRoute
      • OPA policy
  • Guides
    • Federate zone control plane
    • Add a builtin Gateway
    • Add Kong as a delegated Gateway
    • Collect Metrics with OpenTelemetry
    • Migration to the new policies
    • Upgrading Transparent Proxy
  • Enterprise Features
    • Overview
    • HashiCorp Vault CA
    • Amazon ACM Private CA
    • cert-manager Private CA
    • OPA policy support
    • MeshOPA
    • Multi-zone authentication
    • FIPS support
    • Certificate Authority rotation
    • Role-Based Access Control
    • Red Hat
      • UBI Images
      • Red Hat OpenShift Quickstart
    • Windows Support
    • ECS Support
    • Auditing
    • MeshGlobalRateLimit (beta)
    • Verify signatures for signed Kong Mesh images
    • Build provenance
      • Verify build provenance for signed Kong Mesh images
      • Verify build provenance for signed Kong Mesh binaries
  • Reference
    • HTTP API
    • Kubernetes annotations and labels
    • Kuma data collection
    • Control plane configuration reference
    • Envoy proxy template
  • Community
    • Contribute to Kuma
enterprise-switcher-icon Switch to OSS
On this pageOn this page
  • Customization
  • Schema
You are browsing documentation for an older version. See the latest documentation here.

Running built-in gateway pods on Kubernetes

MeshGatewayInstance is a Kubernetes-only resource for deploying Kong Mesh’s builtin gateway.

MeshGateway and MeshHTTPRoute/MeshTCPRoute 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.

Heads up! In previous versions of Kong Mesh, setting the kuma.io/service tag directly within a MeshGatewayInstance resource was used to identify the service. However, this practice is deprecated and no longer recommended for security reasons since Kong Mesh version 2.7.0.

We’ve automatically switched to generating the service name for you based on your MeshGatewayInstance resource name and namespace (format: {name}_{namespace}_svc).

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

Once a MeshGateway exists with kuma.io/service: edge-gateway_default_svc, 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_default_svc.

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:

apiVersion: kuma.io/v1alpha1
kind: MeshGatewayInstance
metadata:
  name: edge-gateway
  namespace: default
spec:
  replicas: 1
  serviceType: LoadBalancer
  serviceTemplate:
    metadata:
      annotations:
        service.beta.kubernetes.io/aws-load-balancer-internal: "true"
  podTemplate:
    metadata:
      labels:
        app-name: my-app

You can also modify several resource limits or security-related parameters for the generated Pods or specify a loadBalancerIP for the Service:

apiVersion: kuma.io/v1alpha1
kind: MeshGatewayInstance
metadata:
  name: edge-gateway
  namespace: default
spec:
  replicas: 1
  serviceType: LoadBalancer
  resources:
    requests:
      memory: 64Mi
      cpu: 250m
    limits:
      memory: 128Mi
      cpu: 500m
  serviceTemplate:
    metadata:
      labels:
        svc-id: "19-001"
    spec:
      loadBalancerIP: 172.17.0.1
  podTemplate:
    metadata:
      annotations:
        app-monitor: "false"
    spec:
      serviceAccountName: my-sa
      securityContext:
        fsGroup: 2000
      container:
        securityContext:
          readOnlyRootFilesystem: true

Schema

MeshGatewayInstance represents a managed instance of a dataplane proxy for a KumaGateway.

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, andmay 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
  • 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
          • 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
              • securityContext
                • PodSecurityContext corresponds to PodSpec.SecurityContext
                • Type: object
                • Properties
                  • fsGroup
                    • FSGroup corresponds to PodSpec.SecurityContext.FSGroup
                    • Type: integer
              • serviceAccountName
                • ServiceAccountName corresponds to PodSpec.ServiceAccountName.
                • Type: string
      • replicas

        • Replicas is the number of dataplane proxy replicas to create. Fornow this is a fixed number, but in the future it could beautomatically 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 theDynamicResourceAllocation 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 ofthe Pod where this field is used. It makes that resource availableinside a container.
                  • Type: string
          • 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
      • 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
          • spec
            • Spec holds some customizable fields of a Service.
            • Type: object
            • Properties
              • loadBalancerIP
                • LoadBalancerIP corresponds to ServiceSpec.LoadBalancerIP.
                • Type: string
      • serviceType

        • ServiceType specifies the type of managed Service that will becreated to expose the dataplane proxies to traffic from outsidethe cluster. The ports to expose will be taken from the matching Gatewayresource. If there is no matching Gateway, the managed Service willbe deleted.
        • Type: string
        • The value is restricted to the following:
          1. "LoadBalancer"
          2. "ClusterIP"
          3. "NodePort"
        • Default: "LoadBalancer"
      • tags

        • Tags specifies the Kuma tags that are propagated to the manageddataplane proxies. These tags should include exactly onekuma.io/service tag, and should match exactly one Gatewayresource.
        • Type: object
        • This schema accepts additional properties.
        • Properties
  • status

    • MeshGatewayInstanceStatus holds information about the status of the gatewayinstance.

    • 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 datewith 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:
                1. "True"
                2. "False"
                3. "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 beuseful (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
      • 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 withthe destination set to the load-balancer's IP and port.Setting this to "Proxy" indicates that traffic is delivered to the node or pod withthe 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 portsIf 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 portThe 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 hereThe supported values are: "TCP", "UDP", "SCTP"
                        • Type: string
                        • Default: "TCP"

Generated with json-schema-md-doc Sat May 10 2025 18:55:50 GMT+0000 (Coordinated Universal Time)

Thank you for your feedback.
Was this page useful?
Too much on your plate? close cta icon
More features, less infrastructure with Kong Konnect. 1M requests per month for free.
Try it for Free
  • Kong
    Powering the API world

    Increase developer productivity, security, and performance at scale with the unified platform for API management, service mesh, and ingress controller.

    • Products
      • Kong Konnect
      • Kong Gateway Enterprise
      • Kong Gateway
      • Kong Mesh
      • Kong Ingress Controller
      • Kong Insomnia
      • Product Updates
      • Get Started
    • Documentation
      • Kong Konnect Docs
      • Kong Gateway Docs
      • Kong Mesh Docs
      • Kong Insomnia Docs
      • Kong Konnect Plugin Hub
    • Open Source
      • Kong Gateway
      • Kuma
      • Insomnia
      • Kong Community
    • Company
      • About Kong
      • Customers
      • Careers
      • Press
      • Events
      • Contact
  • Terms• Privacy• Trust and Compliance
© Kong Inc. 2025