Enterprise license

Uses: Kong Gateway Operator
Related Documentation

Kong Gateway Operator can enable enterprise features using the KongLicense CRD or by providing your license as an environment variable to your DataPlane pods.

KongLicense

  1. Create a file named license.json containing your Kong Gateway Enterprise license.

  2. Create a KongLicense object with the rawLicenseString field set to your license:

    echo "
    apiVersion: configuration.konghq.com/v1alpha1
    kind: KongLicense
    metadata:
      name: kong-license
    rawLicenseString: '$(cat ./license.json)'
    " | kubectl apply -f -
    
  3. Verify that Kong Ingress Controller is using the license:

    kubectl describe konglicense kong-license
    

    The results should look like this, including the Programmed condition with True 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

  1. Create a Kubernetes secret containing your license:

     kubectl create secret generic kong-enterprise-license --from-file=license=./license.json -n default
    
  2. Specify the KONG_LICENSE_DATA environment variable for your DataPlane pods. This can be provided on the DataPlane or GatewayConfiguration

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
Something wrong?

Help us make these docs great!

Kong Developer docs are open source. If you find these useful and want to make them better, contribute today!