Kong Gateway Operator can enable enterprise features using the KongLicense
CRD or by providing your license as an environment variable to your DataPlane pods.
Enterprise license
Uses:
Kong Gateway Operator
Related Documentation
KongLicense
-
Create a file named
license.json
containing your Kong Gateway Enterprise license. -
Create a
KongLicense
object with therawLicenseString
field set to your license:echo " apiVersion: configuration.konghq.com/v1alpha1 kind: KongLicense metadata: name: kong-license rawLicenseString: '$(cat ./license.json)' " | kubectl apply -f -
-
Verify that Kong Ingress Controller is using the license:
kubectl describe konglicense kong-license
The results should look like this, including the
Programmed
condition withTrue
status:Name: kong-license Namespace: Labels: <none> Annotations: <none> API Version: configuration.konghq.com/v1alpha1 Enabled: true Kind: KongLicense Metadata: Creation Timestamp: 2024-02-06T15:37:58Z Generation: 1 Resource Version: 2888 Raw License String: <your-license-string> Status: Controllers: Conditions: Last Transition Time: 2024-02-06T15:37:58Z Message: Reason: PickedAsLatest Status: True Type: Programmed Controller Name: konghq.com/kong-gateway-operator
Using environment variables
-
Create a Kubernetes secret containing your license:
kubectl create secret generic kong-enterprise-license --from-file=license=./license.json -n default
-
Specify the
KONG_LICENSE_DATA
environment variable for your DataPlane pods. This can be provided on theDataPlane
orGatewayConfiguration
DataPlane
apiVersion: gateway-operator.konghq.com/v1beta1
kind: DataPlane
metadata:
name: dataplane-example
spec:
deployment:
podTemplateSpec:
spec:
containers:
- name: proxy
image: kong/kong-gateway:3.10
env:
- name: KONG_LICENSE_DATA
valueFrom:
secretKeyRef:
key: license
name: kong-enterprise-license
GatewayConfiguration
kind: GatewayConfiguration
apiVersion: gateway-operator.konghq.com/v1
metadata:
name: kong
namespace: default
spec:
dataPlaneOptions:
deployment:
podTemplateSpec:
spec:
containers:
- name: proxy
image: kong/kong-gateway:3.10
env:
- name: KONG_LICENSE_DATA
valueFrom:
secretKeyRef:
key: license
name: kong-enterprise-license