Installing License Service on the Kubernetes cluster

Learn how to install License Service on Kubernetes with kubectl.


Before installation, see Supported platforms and hardware requirements to check the installation requirements.


Note: For the OpenShift cluster, check whether the License Service is installed in cs-control or ibm-common-services namespace of the cluster to prevent the use of the multiple License Service copies to report the license usage of multiple IBM Cloud Paks that are running on the same cluster.

If you install the License Service in cs-control or ibm-common-services namespace and multiple IBM Cloud Paks run on the same cluster, upgrade the License Service to the latest version.

If a single instance of IBM Cloud Pak runs on the cluster, you can install the License Service in the ibm-licensing namespace.

  1. Install the Operator Lifecycle Manager (OLM).

    1. Make sure that you are connected to your cluster and run the following command:

      kubectl get node

      The response should contain a list of your nodes.

    2. Verify the installation of OLM with the following command:

      kubectl get crd
      • If you get the following response, the OLM is installed.

         NAME                                          CREATED AT   2020-06-04T14:42:13Z
      • If you get the following response, the OLM CRD is not installed.

         Error from server (NotFound): "" not found
    3. If the OLM is not installed, download it from the OLM GitHub repository. Use the following script to download and install OLM v0.19.1

      Note: : This procedure is applicable for OLM version v0.19.1. For newer versions, check OLM documentation.

      curl -sL${olm_version}/ | bash -s ${olm_version}

      Troubleshooting: If you get an error, upgrade your Kubernetes server version or use older version of the OLM.

  2. Create the CatalogSource.

    1. To get GLOBAL_CATALOG_NAMESPACE, check global catalog namespace in a yaml in a packageserver OLM pod that is somewhere on your cluster. You can, for example, use the following command:

      olm_namespace=$(kubectl get csv --all-namespaces -l olm.version -o jsonpath="{.items[?('packageserver')].metadata.namespace}")
      GLOBAL_CATALOG_NAMESPACE=$(kubectl get deployment --namespace="${olm_namespace}" packageserver -o yaml | grep -A 1 -i global-namespace | tail -1 | cut -d "-" -f 2- | sed -e 's/^[ \t]*//')
      # check if the namespace is found

      If you get an empty response to the echo command, you can get global catalog namespace using the following command.

      Note: The following method should only be used for getting global catalog namespace if the previous method failed.

      GLOBAL_CATALOG_NAMESPACE=$(kubectl get pod --all-namespaces -l app=olm-operator -o jsonpath="{.items[0].metadata.namespace}")
    2. Create the CatalogSource by using the following command:

      cat <<EOF | kubectl apply -f -
      kind: CatalogSource
        name: ibm-licensing-catalog
        namespace: $GLOBAL_CATALOG_NAMESPACE
        displayName: IBM License Service Catalog
        publisher: IBM
        sourceType: grpc
            interval: 45m
    3. Check the results.

      • Run the following command to check if the CatalogSource is created in the $GLOBAL_CATALOG_NAMESPACE namespace:

         kubectl get catalogsource -n $GLOBAL_CATALOG_NAMESPACE

        The following is the sample output:

         NAME                           DISPLAY                        TYPE   PUBLISHER   AGE
         ibm-licensing-catalog          IBM License Service Catalog    grpc   IBM         16m
      • If everything goes well, you should see similar pod running. Run the following command to check if the pod is running:

         kubectl get pod -n $GLOBAL_CATALOG_NAMESPACE

        The following is the sample output:

         NAME                                   READY   STATUS    RESTARTS   AGE
         ibm-licensing-catalog-1v1g2            1/1     Running   0          18m
  3. Create an OperatorGroup.

    An OperatorGroup is used to denote which namespaces your Operator should watch. It must exist in the namespace where your operator is deployed, for example, <foundational-services>.

    1. Create a namespace for IBM Licensing with the following command.

      Note: The ibm-licensing namespace is the default namespace of the License Service. If you need to install the License Service in a custom namespace for your cluster, replace ibm-licensing with your custom namespace.

      kubectl create namespace ibm-licensing
    2. Check if the operator group exists in that namespace by running the following command:

      kubectl get OperatorGroup -n ibm-licensing
      • If you get the following response, the operator group was found, and you can go to step 4 and create a Subscription.

         NAME            AGE
         operatorgroup   39d
      • If you get the following response, the operator group was not found, and you need to create it.

         No resources found.
    3. Create the operator group.

      Use the following command to deploy the OperatorGroup resource.

      cat <<EOF | kubectl apply -f -
      kind: OperatorGroup
        name: operatorgroup
        namespace: ibm-licensing
        - ibm-licensing
  4. Create a Subscription.

    A subscription is created for the operator and is responsible for upgrades of IBM Licensing when needed.

    1. Make sure that the GLOBAL_CATALOG_NAMESPACE variable has the global catalog namespace value. The global catalog namespace was retrieved in step 2.

    2. Create the Subscription using the following command:

      cat <<EOF | kubectl apply -f -
      kind: Subscription
        name: ibm-licensing-operator-app
        namespace: ibm-licensing
        channel: v4.1
        name: ibm-licensing-operator-app
        source: ibm-licensing-catalog
        sourceNamespace: $GLOBAL_CATALOG_NAMESPACE
  5. Verify operator health.

    1. To check whether IBM Licensing is deployed by OLM from the CatalogSource, run the following command.

      kubectl get clusterserviceversion -n ibm-licensing -o jsonpath="v{.items[*].spec.version}"

      The Output should be the latest IBM Licensing release version. To check the latest IBM Licensing release version, see ibm-licensing-operator.

      The example output:

      // Copyright 2022 IBM Corporation
      // Licensed under the Apache License, Version 2.0 (the "License");
      // you may not use this file except in compliance with the License.
      // You may obtain a copy of the License at
      // Unless required by applicable law or agreed to in writing, software
      // distributed under the License is distributed on an "AS IS" BASIS,
      // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
      // See the License for the specific language governing permissions and
      // limitations under the License.
      package version
      var (
               Version = "1.16.6"

      Note: The above command assumes that you have created the Subscription in the ibm-licensing namespace. If your Operator deployment (CSV) shows Succeeded in the InstallPhase status, the operator is deployed successfully. Otherwise, check the ClusterServiceVersion objects status for details.

    2. Optional: Check if the operator is deployed. Run the following command:

      kubectl get deployment -n ibm-licensing | grep ibm-licensing-operator
  6. Configure the Kubernetes ingress. For more information, see Configuring ingress.

The Operator for IBM Licensing Service is created and only responsible for watching over the configuration and managing resources of IBM Licensing Service.


To check whether License Service components are properly installed and running, see Checking License Service components.