1. Operate Private Cloud
  2. Migrate

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 users, the license key 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 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 manifest:

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, BookKeeperCluster, PulsarBroker and PulsarProxy 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
---
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 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:

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:

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 to update your StreamNative Platform.

Previous
upgrade-from-pulsar-operators