The kong2kic
command converts a Kong Gateway declarative configuration file in to Kubernetes CRDs that can be used with the Kong Ingress Controller.
kong2kic
generates Gateway API HTTPRoute
resources by default. If you’re using ingress
resources, you can specify the --ingress
flag.
Consumers, Consumer Groups, Plugins, and other supported Kong entities are converted to the related Kong
prefixed resources, such as KongConsumer
.
deck file kong2kic -s kong.yaml -o k8s.yaml
The following table details how Kong configuration entities are mapped to Kubernetes manifests:
decK entity |
K8s entity |
---|---|
Service | Service with annotations and KongIngress for upstream section |
Route | Ingress (Ingress API) or HTTPRoute (Gateway API) with annotations |
Global Plugin | KongClusterPlugin |
Plugin | KongPlugin |
Auth Plugins (key-auth , hmac-auth , jwt , basic-auth , oauth2 , acl , mtls-auth )
|
KongPlugin and Secret with credentials section in KongConsumer |
Upstream | KongIngress or kongUpstreamPolicy |
Consumer | KongConsumer |
ConsumerGroup | KongConsumerGroup |
Certificate |
kubernetes.io/tls Secret
|
CA Certificate | generic Secret |