123DevOps··9 min read

How to configure Kong API Gateway on Kubernetes: Gateway API, plugins, and consumers

Understand Kong services, routes, plugins, and consumers, the OSS vs. Enterprise situation, and set up the Kong Ingress Controller with Gateway API, rate limiting, key-auth, and JWT through CRDs, with validated manifests.

Kubernetes

For years, Ingress NGINX was the default front door for a lot of clusters. That era is over: the Kubernetes project retired Ingress NGINX. The retirement was announced in November 2025, maintenance ended in March 2026, and the repository has been archived. Existing installs keep working, but with no more fixes or CVE patches. The recommended path is to move to the Gateway API (with help from ingress2gateway) or to another controller (see Kubernetes networking and the introduction to Services).

Many teams use the migration to gain more than routing: API gateway features such as authentication, per-client limits, and plugins. Kong is one of the best-known options for that inside the cluster. In this guide we set up Kong on Kubernetes with Gateway API and protect an API with rate limiting, key-auth, and JWT.

Kong concepts: services, routes, plugins, and consumers

Entity What it is How it shows up in Kubernetes (KIC)
Service The upstream backend that receives the traffic Generated from the Service referenced in backendRefs
Route A matching rule (host, path, method) that leads to a service Generated from the HTTPRoute (or Ingress)
Plugin Extra behavior: authentication, rate limiting, transformation, logging A KongPlugin (or KongClusterPlugin) CRD attached by annotation
Consumer The identity of whoever calls the API, with credentials A KongConsumer CRD + a Secret holding the credential

Plugins can be applied to a route, a service, a consumer, or globally. The consumer is what makes “per-client limits” possible: rate limiting counts requests per authenticated consumer.

OSS or Enterprise?

Tread carefully here, because the landscape has changed and a lot of what you find online is out of date. Based on the official releases checked in November 2026:

  • Open source Kong Gateway builds stop at the 3.9.x line (the latest is 3.9.5). There is no OSS 3.10+ image, and kong:latest on Docker Hub points to 3.9.5.
  • The 3.10 changelog says “free mode” is no longer available.
  • The Enterprise line is at 3.16 (3.16.0.3), with LTS releases at 3.10 and 3.14.
  • We did not find an explicit official announcement that OSS has ended.

In practice: if your company runs Kong without a contract, understand that the 3.9 line gets no new features, and evaluate the support lifecycle. Check Kong’s official version support page before you decide. Some plugins, such as OpenID Connect, have always been Enterprise-only.

Kong on Kubernetes: KIC, Gateway API, and Kong Operator

There are two official ways to run Kong on Kubernetes:

  • Kong Ingress Controller (KIC): watches Kubernetes objects (Gateway API, Ingress, and Kong’s CRDs) and configures a Kong running in DB-less mode. The current version is 3.5.x, an LTS alongside 3.4.x. According to the compatibility matrix, KIC 3.5 supports Gateway API 1.0 through 1.3: HTTPRoute and GRPCRoute, plus TCPRoute, UDPRoute, and TLSRoute with the experimental channel.
  • Kong Operator: where new development is happening (v2.4.0, conformant with Gateway API v1.7.0). KIC is still supported, but new projects should look at the Operator first.

This guide uses KIC, which is still the best-documented path and is installed by the kong/ingress chart.

Installing with Helm

The chart lives at https://charts.konghq.com (see what is Helm). To expose the proxy on EKS through an NLB from the AWS Load Balancer Controller, use values like these:

# values-eks.yaml
gateway:
  replicaCount: 2
  proxy:
    type: LoadBalancer
    annotations:
      service.beta.kubernetes.io/aws-load-balancer-type: external
      service.beta.kubernetes.io/aws-load-balancer-scheme: internet-facing
      service.beta.kubernetes.io/aws-load-balancer-nlb-target-type: ip
helm repo add kong https://charts.konghq.com
helm repo update

# Render and review before installing
helm template kong kong/ingress -n kong --version 0.24.0 -f values-eks.yaml > kong-render.yaml
kubectl apply --dry-run=client -f kong-render.yaml

# Gateway API CRDs in the version your controller supports (check the KIC matrix)
kubectl apply -f https://github.com/kubernetes-sigs/gateway-api/releases/download/<version>/standard-install.yaml

helm install kong kong/ingress -n kong --create-namespace --version 0.24.0 -f values-eks.yaml

In the lab we only ran helm template (the chart was not installed). Chart 0.24.0 rendered two Deployments, kong-controller with the kong/kubernetes-ingress-controller:3.5 image and kong-gateway with kong:3.9 (the OSS image), plus the kong-gateway-proxy Service of type LoadBalancer with the annotations above, RBAC, and a ValidatingWebhookConfiguration. helm show values shows the gateway in DB-less mode (database: "off"). Kong’s CRDs (KongPlugin, KongConsumer…) ship in the chart’s crds/ folder and are installed by helm install.

If the API should stay private behind AWS API Gateway, switch the scheme to internal and follow how to configure API Gateway.

GatewayClass, Gateway, and HTTPRoute

With KIC, you declare the GatewayClass as “unmanaged” (Kong is already running, installed by the chart) and create a Gateway that accepts routes from other namespaces. Check the controllerName in the docs for the version you run.

apiVersion: gateway.networking.k8s.io/v1
kind: GatewayClass
metadata:
  name: kong
  annotations:
    konghq.com/gatewayclass-unmanaged: "true"
spec:
  controllerName: konghq.com/kic-gateway-controller
---
apiVersion: gateway.networking.k8s.io/v1
kind: Gateway
metadata:
  name: kong
  namespace: kong
spec:
  gatewayClassName: kong
  listeners:
    - name: http
      protocol: HTTP
      port: 80
      allowedRoutes:
        namespaces:
          from: All
---
apiVersion: gateway.networking.k8s.io/v1
kind: HTTPRoute
metadata:
  name: orders
  namespace: shop
  annotations:
    konghq.com/plugins: key-auth,rl-per-consumer
spec:
  parentRefs:
    - name: kong
      namespace: kong
  hostnames:
    - api.example.com
  rules:
    - matches:
        - path:
            type: PathPrefix
            value: /orders
      backendRefs:
        - name: orders
          port: 80

The konghq.com/plugins annotation takes a comma-separated list of KongPlugin objects from the same namespace, and it also works on Ingress and Service.

Plugins with KongPlugin

apiVersion: configuration.konghq.com/v1
kind: KongPlugin
metadata:
  name: rl-per-consumer
  namespace: shop
plugin: rate-limiting
config:
  minute: 60
  hour: 1000
  policy: local
  limit_by: consumer
---
apiVersion: configuration.konghq.com/v1
kind: KongPlugin
metadata:
  name: key-auth
  namespace: shop
plugin: key-auth
config:
  key_names:
    - apikey
  hide_credentials: true
---
apiVersion: configuration.konghq.com/v1
kind: KongPlugin
metadata:
  name: jwt
  namespace: shop
plugin: jwt
config:
  claims_to_verify:
    - exp

rate-limiting

Limits are set per second, minute, hour, day, month, or year; anyone over the limit gets a 429. limit_by defaults to consumer. The default policy, local, counts per node: with two replicas, each pod keeps its own counter. For a shared counter in DB-less mode, use redis; the cluster policy depends on a database.

key-auth

The client sends the key in the header (or query string) named in key_names, which defaults to apikey. With hide_credentials: true, Kong strips the key before forwarding the request to the backend.

jwt

The jwt plugin validates tokens signed with credentials registered on the consumer. By default, the iss claim (key_claim_name) tells Kong which credential to use, and the default algorithm is HS256 (RS, ES, PS, and EdDSA are also supported, with the public key stored in the credential). Put jwt on a different route from key-auth: if both authentication plugins sit on the same route, by default the client has to pass both. To validate Cognito tokens through JWKS, the plugin meant for that is OpenID Connect, which is Enterprise; another option is to validate at AWS API Gateway (see how to configure AWS Cognito).

Consumers and credentials in a Secret

In KIC 3.x, the credential lives in a Secret whose konghq.com/credential label states its type. The KongConsumer references the Secrets and needs the ingress class annotation to be processed.

apiVersion: v1
kind: Secret
metadata:
  name: alice-key-auth
  namespace: shop
  labels:
    konghq.com/credential: key-auth
type: Opaque
stringData:
  key: change-this-key
---
apiVersion: v1
kind: Secret
metadata:
  name: alice-jwt
  namespace: shop
  labels:
    konghq.com/credential: jwt
type: Opaque
stringData:
  key: alice-issuer
  algorithm: HS256
  secret: change-this-secret
---
apiVersion: configuration.konghq.com/v1
kind: KongConsumer
metadata:
  name: alice
  namespace: shop
  annotations:
    kubernetes.io/ingress.class: kong
username: alice
credentials:
  - alice-key-auth
  - alice-jwt

In production, don’t commit these Secrets in plain text: use External Secrets, Sealed Secrets, or your cloud’s secrets manager.

How we validated these manifests

The lab (kind 1.37) has neither Kong nor the Gateway API CRDs installed, so kubectl apply --dry-run=client fails with no matches for kind, because kubectl needs to know the type. So:

  • Gateway API: we temporarily applied the standard v1.7.0 CRDs, ran kubectl apply --dry-run=server and a real apply of the GatewayClass, Gateway, and HTTPRoute (the GatewayClass stayed at Accepted: Unknown, as expected with no controller), tested a deliberate mistake (type: Prefix was rejected), and removed everything, CRDs included.
  • Kong CRDs: we validated KongPlugin and KongConsumer offline against the OpenAPI schema of the CRDs shipped in chart 0.24.0 (fields, types, and required). The actual plugin behavior was not tested.

Testing

After a real install, test through the NLB hostname:

PROXY=$(kubectl -n kong get svc kong-gateway-proxy \
  -o jsonpath='{.status.loadBalancer.ingress[0].hostname}')

curl -i -H 'Host: api.example.com' "http://$PROXY/orders"         # 401: no key
curl -i -H 'Host: api.example.com' -H 'apikey: change-this-key' \
  "http://$PROXY/orders"                                          # 200 + RateLimit-* headers

Repeat the second call past the per-minute limit to see the 429.

Declarative configuration with decK

Outside Kubernetes (Kong on VMs with a database, or on Konnect), declarative configuration is usually done with decK: deck gateway validate, deck gateway diff, and deck gateway sync apply a versioned kong.yaml file. According to the docs, decK does not manage DB-less mode, which is exactly the mode KIC uses; in the cluster, the manifests themselves are the declarative configuration, and you apply them with GitOps and Argo CD. Check the decK docs for the current version.

Checklist

  • Ingress NGINX installs mapped and a migration plan to Gateway API in place
  • A deliberate choice between Kong OSS 3.9.x, Enterprise, or Kong Operator, checked against the official page
  • Chart rendered with helm template and reviewed before helm install
  • Gateway API CRDs at the version the controller supports
  • Sensitive routes with an authentication plugin and per-consumer rate limiting
  • Consumer credentials in Secrets labeled konghq.com/credential, never in Git as plain text
  • Rate limiting backed by redis when you run several replicas and the limit must be global

Replacing Ingress NGINX is your chance to turn the cluster’s front door into a real gateway, with identity and limits declared in YAML.

Get updates on new posts and stay in the loop!