1. Configure Private Cloud

Configure licenses

This page introduces how to configure and manage the license in the StreamNative Private Cloud.

Before installing the StreamNative Private Cloud, you need to import a valid license. Otherwise, StreamNative Private Cloud will stop reconciling with a "no valid license" error message:

ERROR	controller.pulsarcoordinator	Reconciler error	{"reconciler group": "k8s.streamnative.io", "reconciler kind": "PulsarCoordinator", "name": "private-cloud", "namespace": "pulsar", "error": "No valid license has been found under namespace operators, please contact https://streamnative.io/deployment/start-free-trial"}
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).processNextWorkItem

If you do not have any license, you can apply for a trial from https://streamnative.io/deployment/start-free-trial.

Import a license

StreamNative Private Cloud provides a license using the Kubernetes Secret.

To import a license, follow these steps:

  1. Get a license token from StreamNative.
  2. Define a license manifest like the example below:

Note

metadata.labels with the cloud.streamnative.io/type: "license" is required because the sn-operator will detect secrets in its namespace with label and to import automatically.

apiVersion: v1
kind: Secret
metadata:
  labels:
    cloud.streamnative.io/type: "license"
  name: sn-license
  namespace: "the Kubernetes namespace you will install the StreamNative Operator"
type: Opaque
stringData:
  license: "Your license token"
  1. Run the following command to import your license.
kubectl apply -f <your-license-secret-file>

Update a license

Before your current license expires, you need to contact the StreamNative to get a new one.

To update the license, you need to import the new license as a new Kubernetes Secret with a different secret name in the same namespace. StreamNative Private Cloud Operators will automatically detect the new Secret and adopt the new license.

View license status and resource utilization

StreamNative Private Cloud Operators maintain and store the license status and resource usage data to a Kubernetes ConfigMap named sn-valid-license. By default, the ConfigMap is stored in the namespace where StreamNative Private Cloud Operators are installed.

Run the command below to view the license status and resource utilization.

kubectl get configmap sn-private-cloud-license -n operators -o json | jq .data

{
  "issued_to": "Contoso",
  "issuer": "StreamNative, Inc.",
  "email": "[email protected]",
  "expiry_date_in_seconds": "1678867200",
  "issue_date_in_seconds": "1678796436",
  "type": "trial",
  "status": "active",
  "max_compute_unit": "1",
  "max_storage_unit": "1",
  "used_compute_unit": "1500m",
  "used_storage_unit": "3"
}
Previous
License