
When you have Kong deployed on OpenShift, typically the Kong license is stored in a config map named kong-license in the kong namespace. The oc get configmaps command can be used to list the configmaps maps in the kong namespace.
~]$ oc get configmaps --namespace kong
NAME DATA AGE
kong-license 1 89d
The oc describe configmap command can be used to display the current license.
~]$ oc describe configmap/kong-license --namespace kong
{"license":{"version":1,"signature":"xyz987","payload":{"customer":"Acme, Inc.","license_creation_date":"2021-03-01","product_subscription":"Kong Enterprise Edition","support_plan":"null","admin_seats":"Unlimited","dataplanes":"0","license_expiration_date":"2024-04-14","license_key":"abc123"}}}
You may want to redirect the config map to a file, such as backup.yml, so that you can restore the config map if there is some issue after applying the new license.
oc describe configmap/kong-license --namespace kong > backup.yml
The oc edit configmap command can be used to update the config map. There should be 2 blocks in the config map that will need to be updated to have the new license.
oc edit configmap/kong-license --namespace kong
The oc get deployments command can be used to list the deployments in the kong namespace. Notice in this example that the kong-2.4.1.1 deployment has 3 replicas and the kong-admin-2.4.1.1 deployment has 1 replicas. This means that the oc delete pod command can be used to delete the current Kong pods, and new pods will be created so that the Kong deployment has 3 pods and the Kong Admin deployment has 1 pod.
~]$ oc get deployments --namespace kong
NAME READY UP-TO-DATE AVAILABLE AGE
kong-2.4.1.1 3/3 3 3 62d
kong-admin-2.4.1.1 1/1 1 1 62d
postgres 1/1 1 1 385d
The oc get pods command can be used to list the Kong pods in the kong namespace.
~]$ oc get pods --namespace kong
NAME READY STATUS RESTARTS AGE
kong-2.4.1.1-77f5fdf5f6-4zwmj 1/1 Running 0 45d
kong-2.4.1.1-77f5fdf5f6-jlp42 1/1 Running 0 45d
kong-2.4.1.1-77f5fdf5f6-nj57w 1/1 Running 0 45d
kong-admin-2.4.1.1-dd8679d47-259wn 1/1 Running 41 9d
postgres-67b6d87679-8njdg 1/1 Running 15 9d
The oc delete pod command can be used to delete the current Kong pods.
oc delete pod <pod name> --namespace kong
The oc get pods command can be used to show that new pods have been created.
~]$ oc get pods --namespace kong
NAME READY STATUS RESTARTS AGE
kong-2.4.1.1-77f5fdf5f6-4zwmj 1/1 Running 0 16m
kong-2.4.1.1-77f5fdf5f6-jlp42 1/1 Running 0 21m
kong-2.4.1.1-77f5fdf5f6-nj57w 1/1 Running 0 17m
kong-admin-2.4.1.1-dd8679d47-72cpd 1/1 Running 0 14m
If you have a Kong Admin pod, the Kong web browser console can be used to validate that the new license is being used. In the upper righthand corner of the Kong Admin web browser console, select the i (information) icon and scroll down to License Details, verifying the license details are correct.
Did you find this article helpful?
If so, consider buying me a coffee over at