> ## 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.

# Migrate to StreamNative Pulsar Distribution

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.

For [StreamNative Private Cloud](/private-cloud/v2/overview/private-cloud-overview) users, the [license key](/private-cloud/v2/configure-private-cloud/license/private-cloud-licenses) for `sn-operator` can also be used for the StreamNative Pulsar images. The `sn-operator` automatically activate the StreamNative Pulsar images with the imported license key. This documentation provides comprehensive guidance on migrating to StreamNative Pulsar images.

## Prerequisites

* For Pulsar Operators users, you need to follow [Upgrade from Pulsar Operators](/private-cloud/v2/operate-private-cloud/upgrade/upgrade-from-pulsar-operators) to shift the StreamNative Operator.
* `sn-operator` chart: `0.1.1` or higher

## Migrate to StreamNative Pulsar images

### Migrate from CRD manifests

Create a [PulsarCoordinator](/private-cloud/v2/configure-private-cloud/components/private-cloud-components#pulsar-coordinator) manifest:

```yaml theme={null}
apiVersion: k8s.streamnative.io/v1alpha1
kind: PulsarCoordinator
metadata:
  name: private-cloud
  namespace: pulsar
spec:
  image: streamnative/private-cloud:3.2.1.3
```

Add `k8s.streamnative.io/coordinator-name` label on [ZooKeeperCluster](/private-cloud/v2/configure-private-cloud/components/private-cloud-components#pulsar-coordinator), [BookKeeperCluster](/private-cloud/v2/configure-private-cloud/components/private-cloud-components#book-keeper), [PulsarBroker](/private-cloud/v2/configure-private-cloud/components/private-cloud-components#pulsar-broker) and [PulsarProxy](/private-cloud/v2/configure-private-cloud/components/private-cloud-components#pulsar-proxy) manifests:

```
apiVersion: zookeeper.streamnative.io/v1alpha1
kind: ZooKeeperCluster
metadata:
  name: private-cloud
  namespace: pulsar
  labels:
    k8s.streamnative.io/coordinator-name: private-cloud
---
apiVersion: bookkeeper.streamnative.io/v1alpha1
kind: BookKeeperCluster
metadata:
  name: private-cloud
  namespace: pulsar
  labels:
    k8s.streamnative.io/coordinator-name: private-cloud
sidebarTitle:  1  - migrate-to-sn-images.md
---
apiVersion: pulsar.streamnative.io/v1alpha1
kind: PulsarBroker
metadata:
  name: private-cloud
  namespace: pulsar
  labels:
    k8s.streamnative.io/coordinator-name: private-cloud
---
apiVersion: pulsar.streamnative.io/v1alpha1
kind: PulsarProxy
metadata:
  name: private-cloud
  namespace: pulsar
  labels:
    k8s.streamnative.io/coordinator-name: private-cloud
```

After applying these configurations on your manifests, you should see a Secret called `private-cloud-sn-license` under your Kubernetes namespace. This Secret will be mounted by your Pulsar cluster to activate.

### Migrate from StreamNative Platform Chart

Create a [PulsarCoordinator](/private-cloud/v2/configure-private-cloud/components/private-cloud-components#pulsar-coordinator) manifest, and the `PulsarCoordinator` object's `metadata.name` should be same with the `PulsarBroker` object. You can run below commands to get the `PulsarBroker` object name:

```
kubectl get pulsarbroker -n snp

NAME                   REPLICAS   READY REPLICAS   DESIRED IMAGE                           AGE
snp-sn-platform-slim   1          1                streamnative/sn-platform-slim:3.0.3.5   16m
```

After getting the `PulsarBroker` object name, Create the `PulsarCoordinator` like below:

```yaml theme={null}
apiVersion: k8s.streamnative.io/v1alpha1
kind: PulsarCoordinator
metadata:
  name: <Your PulsarBroker object name>
  namespace: <Your Pulsar cluster installed namespace>
spec:
  # Make sure to disable the toolSet CR object to avoid conflict
  toolSet:
    enabled: false
```

Add `k8s.streamnative.io/coordinator-name` label on `zookeeper.zooKeeperCluster.labels`, `bookkeeper.bookKeeperCluster.labels`, `broker.pulsarBroker.labels` and `proxy.pulsarProxy.labels`:

```yaml theme={null}
zookeeper:
  # zooKeeperCluster indicates the setup for the CR(CustomResource) of the ZooKeeperCluster
  zooKeeperCluster:
    # labels that will be added on the ZooKeeperCluster CR only.
    labels:
      k8s.streamnative.io/coordinator-name: <Your PulsarCoordinator object name>

bookkeeper:
  # bookKeeperCluster indicates the setup for the CR(CustomResource) of the BookKeeperCluster
  bookKeeperCluster:
    # labels that will be added on the BookKeeperCluster CR only.
    labels:
      k8s.streamnative.io/coordinator-name: <Your PulsarCoordinator object name>

broker:
  # pulsarBroker indicates the setup for the CR(CustomResource) of the PulsarBroker
  pulsarBroker:
    # labels that will be added on the PulsarBroker CR only.
    labels:
      k8s.streamnative.io/coordinator-name: <Your PulsarCoordinator object name>

proxy:
  # pulsarProxy indicates the setup for the CR(CustomResource) of the PulsarProxy
  pulsarProxy:
    # labels that will be added on the PulsarProxy CR only.
    labels:
      k8s.streamnative.io/coordinator-name: <Your PulsarCoordinator object name>
```

After updating configuration, run the [helm upgrade](https://helm.sh/docs/helm/helm_upgrade/) to update your StreamNative Platform.
