Your Kong data planes, the gateways that carry your API traffic, run in Kubernetes and get their configuration from a control plane in Konnect, Kong’s hosted management service. Then the data planes lose that connection for half an hour, because of an incident on Konnect’s side or a firewall change on yours. The pods you already have keep serving. The pod the autoscaler adds for the traffic peak sits at 503 on its readiness check and never takes a request.

This post shows both halves of a Kong Control Plane outage on a local kind cluster. Then it fixes the second one with Kong’s Control Plane outage management, also called fallback configuration, for Kong Gateway and Kong AI Gateway on Konnect, and for a self-managed control plane.

At a glance

  • The answer: running data planes keep serving, new pods never become Ready, and fallback configuration fixes that. You need it if pods get replaced or added while Konnect is unreachable.
  • You get: a cluster you can cut off from Konnect on purpose, and a test that shows which pods keep serving and which never start. With fallback configuration, a new pod served within 15 seconds in my runs.
  • You need: Docker, mise, curl, openssl and a Konnect account with a personal access token. A new account starts with a 30-day trial. The self-managed version needs a Kong Enterprise licence instead of Konnect.
  • Time: on my run, make up took about 75 seconds for Kong Gateway and 2 minutes for AI Gateway, and make test about 2.5 minutes, with the container images already pulled.
  • It creates: a control plane named outage-lab (or an AI Gateway named outage-lab-ai) in that account. make clean deletes it.
  • Settings to get right: a separate exporter that takes no traffic, read-only credentials for every other data plane, and exactly the same Kong version on both (Step 2).

Running pods survive a Konnect outage, new pods don’t

During a Konnect outage, Kong data planes that are already running keep serving with their last configuration, and a restarted container reloads its own cached copy. A new data plane pod has no copy, so it never becomes Ready until Konnect is back, unless fallback configuration is turned on.

During the outageWithout fallback configurationWith fallback configuration
Pods that were already runningkeep serving (20 of 20 requests)keep serving
A container restart in a running podserves again from its own cacheserves again
A new pod (scale-up, node drain, rollout)never Ready, /status/ready returns 503Ready, serving within 15 seconds

I expected the container restart to be the risky case. It isn’t. In this Helm setup the configuration cache sits in the pod’s Kong prefix, an emptyDir volume, which survives a container restart in the same pod. The restarted container served again 16 seconds after kong quit. A new pod gets a new, empty volume.

The new pod fails quietly. It runs, its readiness check answers 503 with {"message":"router builds not yet complete, router ready in 0 of 1 workers"}, and its log fills with lines like this one:

[rpc] connection to control plane wss://<id>.eu.cp.konghq.com:443/v2/outlet broken: failed to connect: timeout

A self-managed control plane behaves the same way, and Step 5 runs the same test against one.

Prerequisites

Docker and the tools pinned in the repository’s mise.toml. The lab cuts the kind node off from Konnect with iptables inside the node container, so other clusters and your own machine keep their connection. It simulates the data planes losing their connection to Konnect. Konnect itself keeps running.

Versions used: Kong Gateway 3.16.0.3 · Kong AI Gateway 2.3.2 · Helm chart kong/kong 3.4.1 · Postgres 17.12 · Kong Operator 2.4.0 (chart 1.5.0) · kongctl 1.28.4 · decK 1.70.1 · kind 0.33.0 (Kubernetes 1.37)

Step 1: Start the lab

git clone https://github.com/bhatikuldeep/kong-konnect-outage-lab
cd kong-konnect-outage-lab
mise install
cp .env.example .env

Set KONNECT_TOKEN in .env, and KONNECT_REGION if your organization isn’t in eu, the default. The S3 settings in the file are optional. Then run everything from the repository root:

make up

make up creates the control plane with kongctl and one route, /echo, that adds the header x-outage-lab-config: v1, so every check can tell the Konnect configuration answered. The route sets protocols: [http, https], because since Kong Gateway 3.14 a new route accepts only https by default. It then creates the cluster, an S3-compatible store (MinIO) with a read-write and a read-only user, and three data planes. It also switches kubectl to the lab’s cluster; make down and make clean switch it back. The last line it prints is the one to wait for.

[22:21:14] ready: curl -i http://127.0.0.1:18480/echo   then: make test

How fallback configuration works

While make up runs, this is what it builds.

One data plane, the exporter, copies the configuration it gets from Konnect into a bucket. The data planes that take traffic, the importers, can only read that bucket. A new pod always asks Konnect first. Only when that fails does it read the bucket, once, then cache the configuration and start proxying.

What happens when Konnect comes back, and with more than one exporter

The pod keeps trying to reach Konnect, and it doesn’t stay on the backup. When I restored the connection, the pod that had started from the bucket reconnected within a second. A configuration change I made in Konnect 15 seconds later was live on that pod 11 seconds after that. The pod without fallback was Ready 12 seconds after the connection came back.

You can run more than one exporter. A leader election picks the one that writes, which is what the election/ objects next to the backup are for.

Do you need it?

Kong’s docs say the feature “is only recommended for users who have to adhere to strict high-availability SLAs because it requires a larger maintenance load”. I’d turn it on when pods get added or replaced while you can’t control the timing: an autoscaler, spot nodes, node failures. If your data planes never get replaced during an outage, you may not need it, but then freeze rollouts and scale-downs until Konnect is back.

Step 2: Configure the fallback exporter and importers

The exporter runs as its own release because the Helm chart can’t stop a data plane from proxying, and Kong recommends against backup nodes taking traffic. The backup job “enlarges the attack surface of a proxying Data Plane and contributes significantly to the P99 delay”.

The three data planes are three Helm releases of the same chart, with one shared values file (helm/common.yaml) for the Konnect connection.

ReleaseFallback settingBucket accessTakes traffic
exportercluster_fallback_config_export: "on"read and writeno
gateway (2 pods)cluster_fallback_config_import: "on"read onlyyes, on 127.0.0.1:18480
nofallbacknonenoneno, it’s the control group

This is what the gateway release gets, abridged. The fallback settings are in helm/gateway.yaml, and scripts/up.sh adds the storage location and endpoint.

env:
  cluster_fallback_config_import: "on"
  cluster_fallback_config_storage: s3://kong-fallback/outage-lab
  log_level: info
customEnv:
  aws_config_storage_endpoint: http://store.outage-lab.svc.cluster.local:9000
  aws_region: us-east-1
  aws_access_key_id:
    valueFrom:
      secretKeyRef: { name: fallback-reader, key: AWS_ACCESS_KEY_ID }
  aws_secret_access_key:
    valueFrom:
      secretKeyRef: { name: fallback-reader, key: AWS_SECRET_ACCESS_KEY }

The exporter’s file is the same with export instead of import and the writer’s Secret. Three settings are easy to get wrong.

  • AWS_CONFIG_STORAGE_ENDPOINT points Kong at an S3-compatible store instead of AWS, so leave it out for real S3. The chart’s customEnv turns aws_config_storage_endpoint into that variable.
  • The object key includes the exact Kong version, outage-lab/3.16.0.3/config.json. An importer on another version finds nothing.
  • log_level: info is only there so you can see [fallback config] fallback config applied. That line is logged at info, so the default notice level hides it.

The test reads the backup with the read-only user before it starts. I expected something encrypted or at least compressed. It’s 2,176 bytes of plain JSON, the whole configuration of the control plane, so anything secret in that configuration is in the bucket too. If your configuration uses vault references, look at what your own backup contains before you decide who can read the bucket.

Step 3: Cut the cluster off from Konnect

make test

The test drops traffic from the kind node to the control plane and telemetry addresses, then works through the cases from the table. This is its output, abridged: the section headers, the blocked addresses and most log excerpts are left out.

[22:21:26] PASS: gateway serves /echo with the Konnect config (200 v1)
[22:21:29] PASS: exporter wrote kong-fallback/outage-lab/3.16.0.3/config.json: 2176 bytes of plain JSON with the lab's config (read with the read-only user)
[22:21:35] PASS: the control plane is unreachable from the cluster
[22:21:36] PASS: running gateway pods served 20/20 requests
[22:21:52] PASS: restarted container serves from its own cache (200 v1)
[22:23:22] PASS: new pod without fallback never became Ready in 90s
    Readiness probe failed: HTTP probe failed with statuscode: 503
[22:23:37] PASS: new pod loaded the fallback config and serves /echo (200 v1)
[22:23:37] PASS: its log says: fallback config applied
[22:23:37] PASS: gateway serves after the outage (200 v1)
[22:23:37] RESULT: 9 passed, 0 failed

The scale-up from two gateway pods to three started at 22:23:22. The new pod logged fallback config applied 10 seconds later, and answered /echo with the v1 header 5 seconds after that. The nofallback pod started under the same conditions was still at 503 after 90 seconds, and the test gives up there.

To see the test fail, set cluster_fallback_config_import to "off" in helm/gateway.yaml and run make up and make test again. The new gateway pod then behaves like the control group, and the test ends with two failed checks and a non-zero exit code.

Step 4: Fallback configuration on Kong AI Gateway

Set LAB_TARGET=ai-gateway in .env, run make clean, which removes what the previous target created in Konnect too, then make up and make test. Here make up ends with a curl for a chat completion instead of /echo. If AI Gateway on Konnect is new to you, start with Proxy and secure your first LLM with Kong AI Gateway. This version runs Kong AI Gateway 2.3.2 with Kong Operator, the way Kong documents AI Gateway on Kubernetes. The operator creates the AI Gateway in Konnect with one model route, and runs the same three roles as AIGatewayDataPlane resources. A stand-in model in the cluster answers in OpenAI format, so no provider key is needed. The fallback settings are the same environment variables, in the data plane’s pod template (ai-gateway/dataplanes.yaml).

The result is the same 9 of 9. The new pod loaded the backup 10 seconds after the scale-up and answered a chat completion 4 seconds later. The backup is 6,462 bytes, under outage-lab/2.3.2/config.json.

I’d use 2.3 or later. The AI Gateway 2.3.0 changelog fixes two issues that stop the backup from working: a backup with ca_certificates or oic_issuers couldn’t be re-imported, and data planes retried certificate setup failures “instead of loading their backup configuration”. It also fixes an export failure with incremental sync when the control plane polls for changes. The AI Gateway configuration reference lists the same fallback settings as Kong Gateway, while its architecture page only describes running data planes.

Two things that broke on my first AI Gateway runs, before any outage

The operator didn’t see the Konnect token Secret for five minutes, and the gateway stayed at failed to get Secret ... not found although the Secret was there. Kong Operator only reads Secrets labelled konghq.com/secret: "true", the default of its --secret-label-selector flag, and a token Secret also needs konghq.com/credential: konnect.

Then every AI Gateway pod was OOMKilled five times in eight minutes. Without KONG_NGINX_WORKER_PROCESSES, Kong starts one worker per CPU the pod can see. One worker per pod fixed it.

Step 5: Fallback configuration with a self-managed control plane

Set LAB_TARGET=self-managed and LICENSE_FILE in .env. LICENSE_FILE is the path to your Kong Enterprise licence file, for example $HOME/license.json. Then run the same make clean, make up and make test. This version runs a Kong Gateway 3.16.0.3 control plane with Postgres from the same Helm chart, and nothing in Konnect. On my runs make up took under 2 minutes and make test about 3.5.

KonnectSelf-managed
Exportera data plane that takes no trafficthe control plane
The outage in the labthe cluster cut off from Konnectthe control plane scaled to zero
What you providea personal access tokena licence and the cluster certificate
  • The control plane is the exporter. You could keep a separate exporter data plane, but Kong’s docs say “The recommended approach is to configure the Control Plane as the exporter and Data Planes as importers”, so the lab does that. Stopping the control plane then also stops the exporter, and a new pod loads the backup it wrote before the outage. The caveats from the production list apply the same way: there is no backup until the first export, and it can be up to one export delay behind.
  • You need a licence. Without one, the control plane’s Admin API refused every write with 403 and Enterprise license missing or expired. Free mode is deprecated. The lab passes the licence to every release through the chart’s enterprise.license_secret.
  • The cluster certificate needs the right name. In the default shared mode, “CP and DP nodes must present the same certificate”, and Kong’s support article says it “must have a common name of kong_clustering”. My first certificate had another name and failed with certificate host mismatch. kong hybrid gen_cert sets that name, so the lab uses it. In production you’d more likely use pki mode with certificates from your own CA.

The result is the same 9 of 9. In my run, the new pod logged fallback config applied 4 seconds after the scale-up and answered /echo with the v1 header 11 seconds after that.

Fallback can hide a data plane that never connected. While my first certificate was wrong, the two gateway pods with import on became Ready, their logs repeating certificate host mismatch, and the pod without fallback stayed at 0/1. They had never reached the control plane, so the only configuration they could have loaded was the backup. Readiness alone won’t tell you that. After any change to the cluster certificates, check that every data plane shows up in the control plane’s /clustering/data-planes Admin API list.

Step 6: Clean up

make clean

This deletes what the lab created in Konnect first, including anything an earlier target left there, then the cluster. If the Konnect delete fails, it stops and leaves everything local in place, so you can run it again.

Before you turn it on in production

  • I’d treat the bucket like a secrets store, because the backup is the full configuration in plain JSON. Kong’s docs leave encryption to you. On S3, the exporter can write with SSE-KMS through cluster_fallback_export_s3_config.
  • Only the exporter gets write access. Kong’s docs list s3:PutObject, s3:GetObject and s3:ListBucket as the S3 permissions involved, and the importers only need to read. On EKS, give the pods IAM roles for service accounts instead of keys.
  • Upgrade the exporter in the same change as the gateway pods. A new gateway version has no backup until an exporter on that version has written one.
  • Right after the exporter starts there is nothing to load. After that it writes at most once per cluster_fallback_config_export_delay, 60 seconds by default, and skips the versions in between, so the backup can be about a minute behind. Alert on a missing or stale config.json, and expire old election/ objects with a lifecycle rule, as the docs suggest.
  • A pod reads the bucket once. If that read fails, the docs say it “won’t retry”, so a bucket that is unreachable at the same moment as Konnect leaves new pods where they were without it.
  • Konnect analytics have a gap for the length of the outage, because the data planes can’t send telemetry. Requests still work.
  • Fallback doesn’t help a data plane that can’t start at all. If cluster_cert or a vault reference in kong.conf can’t be resolved, Kong never gets as far as the fallback.

Not the same as Kong Ingress Controller’s fallback configurationKong Ingress Controller has a feature also called fallback configuration. It’s a different thing. When one team’s Kubernetes object is broken, it lets the rest of the configuration keep updating. It has nothing to do with a control plane outage, and search results mix the two up.

Troubleshooting

  • New pod stuck at 503 although import is on. Nothing has been exported for this exact version yet, or the read failed and won’t be retried. Check that the exporter runs the same full image tag and has written <prefix>/<version>/config.json, then replace the pod.
  • The AWS Access Key Id you provided does not exist in our records. The data plane is talking to real AWS. For an S3-compatible store, AWS_CONFIG_STORAGE_ENDPOINT is missing or misspelled.
  • No fallback config applied line, but the pod is Ready. The log level is notice, or Konnect was reachable when the pod started. At info, a pod that uses the backup logs control_plane not connected. Fetching config from fallback storage first.

Runbook checklist

  1. Run the exporter as its own deployment, with write access to the bucket and no load balancer in front of it. I’d run one per Kong version you have in production, because the backup is stored per version.
  2. Turn on cluster_fallback_config_import for every data plane that takes traffic, with read-only credentials.
  3. Encrypt the bucket, alert when config.json is older than your last configuration change, and expire old election/ objects.
  4. Upgrade the exporter in the same change as the gateway pods.
  5. Once per upgrade, cut egress to the control plane in a test cluster, scale up, and check that the new pod serves.

References