Instead of the Admin API you write Kubernetes objects. KongPlugin and KongIngress attach configuration to Ingress or Gateway API resources by annotation.
apiVersion: configuration.konghq.com/v1
kind: KongPlugin
metadata:
name: rate-limit-100
config:
minute: 100
policy: redis
redis_host: redis.internal
plugin: rate-limiting
---
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: billing
annotations:
konghq.com/plugins: rate-limit-100
konghq.com/strip-path: "true"
spec:
ingressClassName: kong
rules:
- http:
paths:
- path: /billing
pathType: Prefix
backend: { service: { name: billing, port: { number: 8080 } } }
# The controller runs Kong in DB-less mode and rewrites the declarative
# config from the cluster state. Do not also configure it through the Admin
# API - the next reconcile will discard whatever you did.
#
# A KongPlugin in a namespace applies to that namespace; KongClusterPlugin
# is the cluster-wide equivalent.
Run this yourself in the Online Java Compiler, spin up a live REST API in the API Sandbox, or practise with Java interview questions.
Published 2026-08-25