> ## Documentation Index
> Fetch the complete documentation index at: https://docs.streamnative.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Configure license for StreamNative images

<Note title="Note">
  Starting March 31st, 2024, access to the StreamNative Pulsar distribution will require a valid StreamNative subscription. As a result, StreamNative Pulsar images such as `streamnative/private-cloud`, `streamnative/sn-platform` and `streamnative/sn-platform-slim` will require a license key to run; otherwise, the component will fail to start.
</Note>

Provision Pulsar cluster with `PulsarCoordinator` object doesn't need to configure license for StreamNative docker images, `sn-operator` will issue the valid license for images after detecting the `PulsarCoordinator` object. For some cases you can't use the `PulsarCoordinator` object, you can directly configure license for docker images.

## Import license

If you do not have any license, you can contact StreamNative to apply for a [free trial](https://streamnative.io/deployment/start-free-trial).

When you have a license in hand, you can import it through:

```
cat <<EOF | kubectl apply -f -
apiVersion: v1
kind: Secret
metadata:
  labels:
    cloud.streamnative.io/type: "license"
  name: sn-license
  namespace: "the Kubernetes namespace you will install the StreamNative Pulsar Cluster"
type: Opaque
stringData:
  license: "Your license token"
EOF
```

## Configure image license with `sn-operator`

If you already installed the `sn-operator`, you can configure the license `Secret` on the `spec.pod.secretRefs` field:

```
spec:
  pod:
    secretRefs:
    - mountPath: /mnt/sn-license
      secretName: "sn-license"
```

## Configure image license without `sn-operator`

If you don't install the `sn-operator`, we can configure liense secret on broker StatefulSet。

On the broker's `StatefulSet` object, add the license `Secret` by

```
apiVersion: apps/v1
kind: StatefulSet
spec:
  template:
    spec:
      containers:
        name: pulsar-broker
        volumeMounts:
        - mountPath: /mnt/sn-license
          name: secret-sn-license
          readOnly: true
      volumes:
      - name: secret-sn-license
        secret:
          defaultMode: 420
          secretName: sn-license
```
