Skip to content

[Bug]: Gateway controller restart silently breaks all API traffic with 503 cluster_not_found until every API is redeployed #3197

Description

@MinuraKariyawasam

Please select the area the issue is related to

Gateway

Please select the aspect the issue is related to

Aspect/Other (Anything else which does not match above categories)

Description

We have a gateway (1.2.0) connected to an on-prem APIM 4.7.0 control plane, deploying APIs top-down from the Publisher. Everything works - APIs deploy, JWT auth works, calls return 200.

But whenever the gateway controller restarts (a helm upgrade, a pod restart, anything), every API starts returning 503. Auth still works - calls without a token still get 401 - so it looks like the backend is down, but it isn't. Envoy's access log shows the real reason:

{"respCd":503, "respCdDtl":"cluster_not_found", "respFlg":"NC"}

The only way to recover is to redeploy each API from the Publisher. Then it works again - until the next restart.

How to slove this? is there anything that we're missing on our side?

Minura.

Steps to Reproduce

Steps to Reproduce

  1. Connect a gateway (1.2.0) to an APIM 4.7.0 control plane (Platform Gateway
    mode, top-down).

  2. In the Publisher, create a simple REST API - we used
    https://jsonplaceholder.typicode.com/todos as the endpoint, context
    /todos, version 1.0.0. Deploy and publish it.

  3. Call it — works:

    curl -k https://<gateway-host>:8443/todos/1.0.0 -H "Authorization: Bearer <token>"
    # HTTP 200
  4. Restart the controller:

    kubectl -n <ns> rollout restart deploy/<release>-controller
  5. Call it again, same request:

    # HTTP 503 (empty body)
    # without a token you still get 401, so auth is fine
  6. To see the mismatch, compare Envoy's cluster names before and after the
    restart (router admin port 9901):

    curl -s http://localhost:9901/clusters | cut -d: -f1 | sort -u
    # before restart: upstream_main_jsonplaceholder.typicode.com_443
    # after restart:  cluster_https_jsonplaceholder_typicode_com
  7. Redeploy the API from the Publisher → 200 again. Restart again → 503 again.


Environment Details (with versions)

Environment Details (with versions)

Gateway        : 1.2.0 (Helm chart, ghcr.io images)
Control plane  : WSO2 APIM 4.7.0, gateway_type = "APIPlatform"
Kubernetes     : k3s v1.35.0 (local, Colima on macOS / Apple Silicon)
Storage        : PostgreSQL 16
Policy         : JWT Auth v1.3 attached at API level, JWKS from APIM

Metadata

Metadata

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions