Configure License Manager

Set up a License Manager for Splunk Operator deployments.

Create a LicenseManager using a ConfigMap and configure Standalone and Indexer Cluster deployments to use it.

  1. Create a ConfigMap that contains your license file or files.
    CODE
    kubectl create configmap splunk-licenses --from-file=enterprise.lic

    The ConfigMap can contain multiple license files:

    CODE
    kubectl create configmap splunk-licenses --from-file=enterprise1.lic,enterprise2.lic
  2. Create a LicenseManager custom resource that mounts the ConfigMap and sets licenseUrl.

    The following example uses API version v4, the name example, namespace splunk-operator, a volume named licenses backed by the splunk-licenses ConfigMap, and licenseUrl pointing at the mounted file:

    CODE
    apiVersion: enterprise.splunk.com/v4
    kind: LicenseManager
    metadata:
      name: example
      namespace: splunk-operator
      finalizers:
      - enterprise.splunk.com/delete-pvc
    spec:
      volumes:
        - name: licenses
          configMap:
            name: splunk-licenses
      licenseUrl: /mnt/licenses/enterprise.lic
    Note:

    licenseUrl can reference more than one license as a comma-separated list:

    CODE
    licenseUrl: "/mnt/licenses/enterprise1.lic,/mnt/licenses/enterprise2.lic"
    Note:

    licenseUrl can specify a local path or a URL such as https://myco.com/enterprise.lic. You can mount any Kubernetes volume type under volumes. See Volumes in the Kubernetes documentation.

  3. Configure Standalone to use the License Manager by adding licenseManagerRef to the Standalone spec.
    CODE
    apiVersion: enterprise.splunk.com/v4
    kind: Standalone
    metadata:
      name: example
      namespace: splunk-operator
      finalizers:
      - enterprise.splunk.com/delete-pvc
    spec:
      licenseManagerRef:
        name: example
  4. Configure Indexer Clusters to use the License Manager by adding licenseManagerRef only to the ClusterManager spec.
    CODE
    cat <<EOF | kubectl apply -f -
    apiVersion: enterprise.splunk.com/v4
    kind: ClusterManager
    metadata:
      name: example-cm
      namespace: splunk-operator
      finalizers:
      - enterprise.splunk.com/delete-pvc
    spec:
      licenseManagerRef:
        name: example
    ---
    apiVersion: enterprise.splunk.com/v3
    kind: IndexerCluster
    metadata:
      name: example-idc
      namespace: splunk-operator
      finalizers:
      - enterprise.splunk.com/delete-pvc
    spec:
      clusterManagerRef:
        name: example-cm
    EOF

    To forward License Manager logs to the Indexer Cluster, add clusterManagerRef to the LicenseManager spec:

    CODE
    apiVersion: enterprise.splunk.com/v4
    kind: LicenseManager
    metadata:
      name: example
      namespace: splunk-operator
      finalizers:
      - enterprise.splunk.com/delete-pvc
    spec:
      volumes:
        - name: licenses
          configMap:
            name: splunk-licenses
      licenseUrl: /mnt/licenses/enterprise.lic
      clusterManagerRef:
        name: example-cm