This guide connects two Kubernetes zones to a Konnect-managed global control plane, then deploys a zone ingress and zone egress in each zone through kuma.meshes[].
Deploy mesh-scoped zone proxies
- Create a Konnect global control plane, a
Mesh, and aMeshIdentity. - Connect each zone control plane, then add a
kuma.meshes[]entry to its Helm values. - Kong Mesh renders a per-mesh Deployment and Service for each role, generates the Dataplane listeners, and publishes the zone ingress address in a
MeshZoneAddress.
Prerequisites
Kong Konnect
If you don’t have a Konnect account, you can get started quickly with our onboarding wizard.
- The following Konnect items are required to complete this tutorial:
- Personal access token (PAT): Create a new personal access token by opening the Konnect PAT page and selecting Generate Token.
-
Set the personal access token as an environment variable:
export KONNECT_TOKEN='YOUR KONNECT TOKEN'
kongctl v1.29.0+
This tutorial uses kongctl to manage Konnect resources programmatically. We recommend keeping kongctl up to date with the latest version (1.29.0).
- Install kongctl from developer.konghq.com/kongctl.
-
Verify the installation:
kongctl version
Create a global control plane in Konnect
-
Set the region where you will create the global control plane:
export KONNECT_REGION='us' -
Create a Kong Mesh v3 control plane in Konnect and save its ID to your environment:
CONTROL_PLANE_ID=$(curl -X POST "https://$KONNECT_REGION.api.konghq.com/v1/mesh/control-planes" \ --no-progress-meter --fail-with-body \ -H "Authorization: Bearer $KONNECT_TOKEN"\ -H "Content-Type: application/json" \ --json '{ "name": "example-cp", "version": "v3" }' | jq -r ".id" )
Start the zone clusters
-
Export the profile names, the shared Docker network, and the static node IPs:
export MZ_NETWORK=guide-mz-net export ZONE1_PROFILE=guide-mz-zone-1 export ZONE2_PROFILE=guide-mz-zone-2 export ZONE1_IP=192.168.240.21 export ZONE2_IP=192.168.240.31 -
Create the shared Docker bridge:
docker network inspect $MZ_NETWORK >/dev/null 2>&1 || \ docker network create --driver bridge --subnet 192.168.240.0/24 $MZ_NETWORK -
Start the zone-1 minikube cluster on the shared Docker bridge:
minikube start -p $ZONE1_PROFILE --driver=docker --network=$MZ_NETWORK --static-ip=$ZONE1_IP -
Start the zone-2 minikube cluster on the shared Docker bridge:
minikube start -p $ZONE2_PROFILE --driver=docker --network=$MZ_NETWORK --static-ip=$ZONE2_IP
Connect zone-1
The zone uses a system account access token with the Connector role on this control plane.
-
Create a system account and save its
idasACCOUNT_ID:ACCOUNT_ID=$(curl -X POST "https://global.api.konghq.com/v3/system-accounts" \ --no-progress-meter --fail-with-body \ -H "Authorization: Bearer $KONNECT_TOKEN"\ -H "Content-Type: application/json" \ --json '{ "name": "mesh-zone-1", "description": "Connect zone-1", "konnect_managed": false }' | jq -r ".id" ) -
Assign the account the
Connectorrole on the control plane:curl -X POST "https://global.api.konghq.com/v3/system-accounts/$ACCOUNT_ID/assigned-roles" \ --no-progress-meter --fail-with-body \ -H "Authorization: Bearer $KONNECT_TOKEN"\ -H "Content-Type: application/json" \ --json '{ "role_name": "Connector", "entity_type_name": "Mesh Control Planes", "entity_id": "'$CONTROL_PLANE_ID'", "entity_region": "'$KONNECT_REGION'" }' -
Set the token to expire in 30 days. Change the number of days if your organization’s token policy requires a shorter lifetime:
export TOKEN_EXPIRES_AT=$(jq -nr 'now + 30*24*60*60 | todate') -
Create the token and save the returned
tokenasCONTROL_PLANE_TOKEN:CONTROL_PLANE_TOKEN=$(curl -X POST "https://global.api.konghq.com/v3/system-accounts/$ACCOUNT_ID/access-tokens" \ --no-progress-meter --fail-with-body \ -H "Authorization: Bearer $KONNECT_TOKEN"\ -H "Content-Type: application/json" \ --json '{ "name": "zone-1", "expires_at": "'$TOKEN_EXPIRES_AT'" }' | jq -r ".token" ) -
Set the KDS address for the same region as the global control plane, and create a working directory:
export CONTROL_PLANE_URL="grpcs://$KONNECT_REGION.mesh.sync.konghq.com:443" export MESH_INSTALL_DIR="$PWD/kong-mesh-zone" mkdir -p "$MESH_INSTALL_DIR" cd "$MESH_INSTALL_DIR" -
Add the Kong Mesh Helm repository:
helm repo add kong-mesh https://kong.github.io/kong-mesh-charts helm repo update -
Create the zone namespace:
kubectl --context $ZONE1_PROFILE create namespace kong-mesh-system -
Store the zone token in a Secret:
kubectl --context $ZONE1_PROFILE -n kong-mesh-system create secret generic cp-token \ --from-literal=token="$CONTROL_PLANE_TOKEN" -
Create
values.yaml:cat <<EOF > values.yaml kuma: controlPlane: mode: zone zone: zone-1 kdsGlobalAddress: $CONTROL_PLANE_URL konnect: cpId: $CONTROL_PLANE_ID zoneToken: secretName: cp-token key: token EOF -
Install the zone control plane:
helm upgrade --install kong-mesh kong-mesh/kong-mesh --kube-context $ZONE1_PROFILE \ --namespace kong-mesh-system --version "3.0.0" \ --values values.yaml --wait --timeout 5m
Connect zone-2
The zone uses a system account access token with the Connector role on this control plane.
-
Create a system account and save its
idasZONE2_ACCOUNT_ID:ZONE2_ACCOUNT_ID=$(curl -X POST "https://global.api.konghq.com/v3/system-accounts" \ --no-progress-meter --fail-with-body \ -H "Authorization: Bearer $KONNECT_TOKEN"\ -H "Content-Type: application/json" \ --json '{ "name": "mesh-zone-2", "description": "Connect zone-2", "konnect_managed": false }' | jq -r ".id" ) -
Assign the account the
Connectorrole on the control plane:curl -X POST "https://global.api.konghq.com/v3/system-accounts/$ZONE2_ACCOUNT_ID/assigned-roles" \ --no-progress-meter --fail-with-body \ -H "Authorization: Bearer $KONNECT_TOKEN"\ -H "Content-Type: application/json" \ --json '{ "role_name": "Connector", "entity_type_name": "Mesh Control Planes", "entity_id": "'$CONTROL_PLANE_ID'", "entity_region": "'$KONNECT_REGION'" }' -
Set the token to expire in 30 days. Change the number of days if your organization’s token policy requires a shorter lifetime:
export TOKEN_EXPIRES_AT=$(jq -nr 'now + 30*24*60*60 | todate') -
Create the token and save the returned
tokenasZONE2_CONTROL_PLANE_TOKEN:ZONE2_CONTROL_PLANE_TOKEN=$(curl -X POST "https://global.api.konghq.com/v3/system-accounts/$ZONE2_ACCOUNT_ID/access-tokens" \ --no-progress-meter --fail-with-body \ -H "Authorization: Bearer $KONNECT_TOKEN"\ -H "Content-Type: application/json" \ --json '{ "name": "zone-2", "expires_at": "'$TOKEN_EXPIRES_AT'" }' | jq -r ".token" ) -
Create the zone namespace:
kubectl --context $ZONE2_PROFILE create namespace kong-mesh-system -
Store the zone token in a Secret:
kubectl --context $ZONE2_PROFILE -n kong-mesh-system create secret generic cp-token \ --from-literal=token="$ZONE2_CONTROL_PLANE_TOKEN" -
Create
zone-2-values.yaml:cat <<EOF > zone-2-values.yaml kuma: controlPlane: mode: zone zone: zone-2 kdsGlobalAddress: $CONTROL_PLANE_URL konnect: cpId: $CONTROL_PLANE_ID zoneToken: secretName: cp-token key: token EOF -
Install the zone control plane:
helm upgrade --install kong-mesh kong-mesh/kong-mesh --kube-context $ZONE2_PROFILE \ --namespace kong-mesh-system --version "3.0.0" \ --values zone-2-values.yaml --wait --timeout 5m
Verify the zone connections
Confirm the zones are connected to your global control plane:
kongctl inspect mesh zones \
--control-plane-id "$CONTROL_PLANE_ID" --region "$KONNECT_REGION" \
--pat "$KONNECT_TOKEN"Each zone should report an Online status:
NAME STATUS
zone-1 Online
zone-2 OnlineIf a zone is missing or not Online, check:
- The zone’s control plane logs
- Outbound access to the KDS address
- The control plane ID
- The system account’s
Connectorrole and token
Create a mesh and secure the test traffic
-
Create a new
konnect-demomesh and a demo identity provider on the global control plane:cat <<'EOF' | kongctl apply mesh -f - --control-plane-id "$CONTROL_PLANE_ID" \ --base-url "https://$KONNECT_REGION.api.konghq.com" --pat "$KONNECT_TOKEN" type: Mesh name: konnect-demo --- type: MeshIdentity mesh: konnect-demo name: demo-identity spec: selector: dataplane: {} spiffeID: trustDomain: konnect-demo.mesh.local provider: type: Bundled bundled: autogenerate: enabled: true insecureAllowSelfSigned: true meshTrustCreation: Enabled EOFMeshIdentityissues certificates and publishes their CA inMeshTrust. This example accepts a generated self-signed CA for the demo; review your production PKI requirements before reusing it. -
Wait for the identity to be ready and for the trust to be generated:
kongctl get mesh meshidentities demo-identity --mesh konnect-demo -o yaml \ --control-plane-id "$CONTROL_PLANE_ID" --region "$KONNECT_REGION" \ --pat "$KONNECT_TOKEN" kongctl get mesh meshtrusts --mesh konnect-demo \ --control-plane-id "$CONTROL_PLANE_ID" --region "$KONNECT_REGION" \ --pat "$KONNECT_TOKEN" -
Confirm that the new mesh has synced to the Kubernetes zone:
kubectl --context $ZONE1_PROFILE get mesh konnect-demo -
Apply a
MeshTrafficPermissionto the zone to allow theclientServiceAccount to call theserverworkload:cat <<'EOF' | kubectl --context $ZONE1_PROFILE apply -f - apiVersion: kuma.io/v1alpha1 kind: MeshTrafficPermission metadata: name: client-to-server namespace: kong-mesh-system labels: kuma.io/mesh: konnect-demo kuma.io/origin: zone spec: targetRef: kind: Dataplane labels: app: server rules: - default: allow: - spiffeID: type: Exact value: spiffe://konnect-demo.mesh.local/ns/kong-mesh-demo/sa/client EOF -
Apply the same permission in zone-2:
cat <<'EOF' | kubectl --context $ZONE2_PROFILE apply -f - apiVersion: kuma.io/v1alpha1 kind: MeshTrafficPermission metadata: name: client-to-server namespace: kong-mesh-system labels: kuma.io/mesh: konnect-demo kuma.io/origin: zone spec: targetRef: kind: Dataplane labels: app: server rules: - default: allow: - spiffeID: type: Exact value: spiffe://konnect-demo.mesh.local/ns/kong-mesh-demo/sa/client EOF
Deploy zone proxies
-
Create a values file that enables both roles for
konnect-demo:cat <<EOF > zone-proxies-values.yaml kuma: meshes: - name: konnect-demo ingress: enabled: true service: type: NodePort egress: enabled: true EOFSet the ingress Service type to
NodePortso the other minikube cluster can reach it on the shared Docker network. Kubernetes assigns the port automatically, and the zone control plane publishes the resulting<node IP>:<nodePort>address in aMeshZoneAddress. Other zones use that address to reach this zone’s ingress.To deploy zone proxies for additional meshes, append more entries to
kuma.meshes. -
Add the zone proxies to both zone releases:
for ctx in $ZONE1_PROFILE $ZONE2_PROFILE; do helm upgrade kong-mesh kong-mesh/kong-mesh --kube-context $ctx \ --namespace kong-mesh-system --version "3.0.0" \ --reuse-values --values zone-proxies-values.yaml done -
Wait for the zone proxies to become available in both zones:
for ctx in $ZONE1_PROFILE $ZONE2_PROFILE; do kubectl --context $ctx -n kong-mesh-system wait \ --for=condition=available deployment -l kuma.io/mesh=konnect-demo --timeout=180s done -
Confirm that each zone published a
MeshZoneAddressand received the other zone’s:kubectl --context $ZONE1_PROFILE -n kong-mesh-system get meshzoneaddresses \ -o custom-columns='ZONE:.metadata.labels.kuma\.io/zone,ADDRESS:.spec.address,PORT:.spec.port'You should see one entry for each zone, with its ingress
NodePort.
Propagate trust between zones
Each zone generates its own CA for the MeshIdentity and publishes it in a zone-local MeshTrust.
The two zones share the konnect-demo.mesh.local trust domain, but they don’t share a CA, and a zone’s MeshTrust isn’t synced to the other zones.
For cross-zone mTLS to work, each zone must trust the other zone’s CA.
-
Read each zone’s trust domain and CA bundle:
export TRUST_DOMAIN=$(kubectl --context $ZONE1_PROFILE -n kong-mesh-system get meshtrust \ -l kuma.io/mesh=konnect-demo,kuma.io/origin=zone -o jsonpath='{.items[0].spec.trustDomain}') export ZONE1_CA=$(kubectl --context $ZONE1_PROFILE -n kong-mesh-system get meshtrust \ -l kuma.io/mesh=konnect-demo,kuma.io/origin=zone -o jsonpath='{.items[0].spec.caBundles[0].pem.value}') export ZONE2_CA=$(kubectl --context $ZONE2_PROFILE -n kong-mesh-system get meshtrust \ -l kuma.io/mesh=konnect-demo,kuma.io/origin=zone -o jsonpath='{.items[0].spec.caBundles[0].pem.value}')The
kuma.io/origin=zoneselector returns the trust that the zone itself created. -
Add zone-1’s CA to zone-2:
cat <<EOF | kubectl --context $ZONE2_PROFILE apply -f - apiVersion: kuma.io/v1alpha1 kind: MeshTrust metadata: name: trust-from-zone-1 namespace: kong-mesh-system labels: kuma.io/mesh: konnect-demo spec: trustDomain: $TRUST_DOMAIN caBundles: - type: Pem pem: value: | $(printf '%s\n' "$ZONE1_CA" | sed 's/^/ /') EOF -
Add zone-2’s CA to zone-1:
cat <<EOF | kubectl --context $ZONE1_PROFILE apply -f - apiVersion: kuma.io/v1alpha1 kind: MeshTrust metadata: name: trust-from-zone-2 namespace: kong-mesh-system labels: kuma.io/mesh: konnect-demo spec: trustDomain: $TRUST_DOMAIN caBundles: - type: Pem pem: value: | $(printf '%s\n' "$ZONE2_CA" | sed 's/^/ /') EOFProxies trust every CA listed for a trust domain, so each zone now accepts certificates issued in either zone.
Deploy the test applications
Both zones get a client and a server, starting with zone-1.
Deploy the applications in zone-1
Deploy an nginx server and a curl client into a namespace that joins the mesh. The client’s
own ServiceAccount gives it the identity that the traffic permission allows. The client also lists
server as a reachable backend, because a proxy can only call the destinations it declares. For
more information, see MeshService.
-
Create the namespace, the client ServiceAccount, and the server and client workloads:
cat <<'EOF' | kubectl --context $ZONE1_PROFILE apply -f - apiVersion: v1 kind: Namespace metadata: name: kong-mesh-demo labels: kuma.io/mesh: konnect-demo kuma.io/sidecar-injection: enabled --- apiVersion: v1 kind: ServiceAccount metadata: name: client namespace: kong-mesh-demo --- apiVersion: v1 kind: Service metadata: name: server namespace: kong-mesh-demo spec: selector: app: server ports: - port: 80 targetPort: 80 appProtocol: http --- apiVersion: apps/v1 kind: Deployment metadata: name: server namespace: kong-mesh-demo spec: replicas: 1 selector: matchLabels: app: server template: metadata: labels: app: server spec: containers: - name: server image: nginx:1.27.4 ports: - containerPort: 80 --- apiVersion: apps/v1 kind: Deployment metadata: name: client namespace: kong-mesh-demo spec: replicas: 1 selector: matchLabels: app: client template: metadata: labels: app: client annotations: kuma.io/reachable-backends: | refs: - kind: MeshService labels: kuma.io/display-name: server k8s.kuma.io/namespace: kong-mesh-demo spec: serviceAccountName: client containers: - name: client image: curlimages/curl:8.12.1 command: ["sleep", "86400"] EOF -
Wait for the server and client to roll out:
kubectl --context $ZONE1_PROFILE -n kong-mesh-demo rollout status deployment/server --timeout=180s kubectl --context $ZONE1_PROFILE -n kong-mesh-demo rollout status deployment/client --timeout=180s
Deploy the applications in zone-2
-
Create the namespace, the client ServiceAccount, and the server and client workloads:
cat <<'EOF' | kubectl --context $ZONE2_PROFILE apply -f - apiVersion: v1 kind: Namespace metadata: name: kong-mesh-demo labels: kuma.io/mesh: konnect-demo kuma.io/sidecar-injection: enabled --- apiVersion: v1 kind: ServiceAccount metadata: name: client namespace: kong-mesh-demo --- apiVersion: v1 kind: Service metadata: name: server namespace: kong-mesh-demo spec: selector: app: server ports: - port: 80 targetPort: 80 appProtocol: http --- apiVersion: apps/v1 kind: Deployment metadata: name: server namespace: kong-mesh-demo spec: replicas: 1 selector: matchLabels: app: server template: metadata: labels: app: server spec: containers: - name: server image: nginx:1.27.4 ports: - containerPort: 80 --- apiVersion: apps/v1 kind: Deployment metadata: name: client namespace: kong-mesh-demo spec: replicas: 1 selector: matchLabels: app: client template: metadata: labels: app: client annotations: kuma.io/reachable-backends: | refs: - kind: MeshService labels: kuma.io/display-name: server k8s.kuma.io/namespace: kong-mesh-demo spec: serviceAccountName: client containers: - name: client image: curlimages/curl:8.12.1 command: ["sleep", "86400"] EOF -
Wait for the server and client to roll out:
kubectl --context $ZONE2_PROFILE -n kong-mesh-demo rollout status deployment/server --timeout=180s kubectl --context $ZONE2_PROFILE -n kong-mesh-demo rollout status deployment/client --timeout=180s
The client’s kuma.io/reachable-backends annotation selects the server MeshService by its kuma.io/display-name and k8s.kuma.io/namespace labels.
Those labels also match the server MeshService synced from the other zone, so the client gets an outbound for both.
Validate
-
From the
clientpod in zone-1, request theserverin zone-2 using its cross-zone hostname:kubectl --context $ZONE1_PROFILE -n kong-mesh-demo exec deployment/client -c client -- \ curl --fail --max-time 10 http://server.kong-mesh-demo.svc.zone-2.mesh.local/You should get the nginx welcome page. The request goes from the zone-1 sidecar straight to the zone-2 zone ingress, at the address in zone-2’s
MeshZoneAddress.If the request fails, check that:
- zone-2 has a
MeshZoneAddresswith the expectedNodePort - Both
MeshTrustcopies exist - The zone-2
MeshTrafficPermissionis in place
- zone-2 has a
-
Confirm that the request went through the zone-2 ingress by reading its Envoy stats through the zone-2 control plane API. Port-forward the zone-2 control plane API in the background:
kubectl --context $ZONE2_PROFILE -n kong-mesh-system port-forward svc/kong-mesh-control-plane 5681:5681 > /dev/null 2>&1 & export PORT_FORWARD_PID=$! -
Look up the zone-2 ingress pod:
export INGRESS_POD=$(kubectl --context $ZONE2_PROFILE -n kong-mesh-system get pod \ -l app=kong-mesh-konnect-demo-ingress -o jsonpath='{.items[0].metadata.name}') -
Get the zone-2 admin token. The stats endpoint requires a user that can view stats:
export ZONE2_ADMIN_TOKEN=$(kubectl --context $ZONE2_PROFILE -n kong-mesh-system get secret admin-user-token \ -o jsonpath='{.data.value}' | base64 -d) -
Read the ingress pod’s connection count for the
servercluster:curl -sS --fail --retry 5 --retry-delay 1 --retry-connrefused \ -H "Authorization: Bearer $ZONE2_ADMIN_TOKEN" \ "http://localhost:5681/meshes/konnect-demo/dataplanes/${INGRESS_POD}.kong-mesh-system/stats" | \ grep 'kong-mesh-demo_server_80.upstream_cx_total'You should see a count greater than zero for the zone-2
servercluster:cluster.kri_msvc_konnect-demo_zone-2_kong-mesh-demo_server_80.upstream_cx_total: 1Run the cross-zone request again and the counter increases.
-
Stop the port-forward:
kill $PORT_FORWARD_PID
Cleanup
Clean up the zones
Delete the zone-1 minikube profile:
minikube delete -p guide-mz-zone-1Delete the zone-2 minikube profile:
minikube delete -p guide-mz-zone-2Delete the shared Docker network:
docker network rm guide-mz-netLeave the zone working directory and delete it:
cd "$(dirname "$MESH_INSTALL_DIR")"
rm -rf "$MESH_INSTALL_DIR"Delete the control plane
Delete the example-cp control plane. This also removes its mesh configuration:
curl --fail-with-body -sS -X DELETE \
"https://$KONNECT_REGION.api.konghq.com/v1/mesh/control-planes/$CONTROL_PLANE_ID" \
-H "Authorization: Bearer $KONNECT_TOKEN"Delete the zone-1 system account
Delete the mesh-zone-1 system account:
curl --fail-with-body -sS -X DELETE \
"https://global.api.konghq.com/v3/system-accounts/$ACCOUNT_ID" \
-H "Authorization: Bearer $KONNECT_TOKEN"Delete the zone-2 system account
Delete the mesh-zone-2 system account:
curl --fail-with-body -sS -X DELETE \
"https://global.api.konghq.com/v3/system-accounts/$ZONE2_ACCOUNT_ID" \
-H "Authorization: Bearer $KONNECT_TOKEN"FAQs
How do I list the per-mesh Deployments and Services?
Query kong-mesh-system filtered by mesh label:
kubectl --context $ZONE1_PROFILE -n kong-mesh-system get deploy,svc -l kuma.io/mesh=konnect-demoYou’ll see a kong-mesh-konnect-demo-ingress and kong-mesh-konnect-demo-egress Deployment, each with a matching Service.
A second mesh produces another pair named after its mesh.
How do I confirm the Services carry the zone-proxy-type label?
kubectl --context $ZONE1_PROFILE -n kong-mesh-system get svc \
-l k8s.kuma.io/zone-proxy-type -L k8s.kuma.io/zone-proxy-typeHow do I confirm the ingress Services are NodePort?
Run the following for each zone and note the published port.
For zone-1:
kubectl --context $ZONE1_PROFILE -n kong-mesh-system get svc kong-mesh-konnect-demo-ingress \
-o jsonpath='{.spec.type}{"\t"}{.spec.ports[0].nodePort}{"\n"}'For zone-2:
kubectl --context $ZONE2_PROFILE -n kong-mesh-system get svc kong-mesh-konnect-demo-ingress \
-o jsonpath='{.spec.type}{"\t"}{.spec.ports[0].nodePort}{"\n"}'How do I inspect the MeshZoneAddress resources?
On a Kubernetes zone, MeshZoneAddress resources live in kong-mesh-system, next to the ingress Service.
Each zone sees its own resource and the ones synced from the other zones:
kubectl --context $ZONE1_PROFILE -n kong-mesh-system get meshzoneaddresses \
-o custom-columns='ZONE:.metadata.labels.kuma\.io/zone,ADDRESS:.spec.address,PORT:.spec.port'The addresses should use the shared Docker bridge IPs and the published ingress NodePort values.
If a zone is missing, check the events on its ingress Service for a NoPublicAddress warning.
How do I view the zone proxy Dataplane resources?
Zone proxies are regular Dataplane resources in the zone’s system namespace:
kubectl --context $ZONE1_PROFILE -n kong-mesh-system get dataplanesWhat do I do if Docker Desktop fails with failed complete: too many open files while starting a minikube profile?
Raise the inotify limits in the Docker Desktop VM:
docker run --rm --privileged alpine \
sysctl -w fs.inotify.max_user_instances=8192 fs.inotify.max_user_watches=524288Then restart the affected profile.