1. Operate Private Cloud
  2. Deploy

Install StreamNative Operator with the Helm Chart

Prerequisites

  • Prepare a Kubernetes cluster (Kubernetes version >= 1.16).
  • Install kubectl (v1.16 or above), compatible with your cluster (+/- 1 minor release from your cluster).
  • Install Helm (v3.0.2 or above).

Create a namespace

  1. Create a Kubernetes namespace where the operator will be installed later.

    kubectl create namespace operators
    

Import license

Before installing the StreamNative Operator, you need to import a valid license. Otherwise, StreamNative Operator 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 contact StreamNative to apply for a free trial.

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

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.

cat <<EOF | kubectl apply -f -
apiVersion: v1
kind: Secret
metadata:
# This label is a required field for the sn-operator to detect the license.
  labels:
    cloud.streamnative.io/type: "license"
  name: sn-license
  namespace: operators
type: Opaque
stringData:
  license: "Your license token"
EOF

Install the StreamNative Operator

  1. Add the StreamNative chart repository.

    helm repo add streamnative https://charts.streamnative.io
    helm repo update
    
  2. Deploy the StreamNative Operator using the sn-operator Helm chart in the created Kubernetes namespace.

    helm install sn-operator streamnative/sn-operator -n operators
    
  3. Verify that Operator Pods are running.

    kubectl get all -n operators
    

Provision a Pulsar cluster

Create the namespaces pulsar. The pulsar namespace is used for deploying your Pulsar cluster.

kubectl create ns pulsar

To provision a Pulsar cluster through the StreamNative Operator, you need to define a YAML file for your Pulsar cluster.

Run the command below to deploy your Pulsar cluster in pulsar namespace

kubectl apply -f https://raw.githubusercontent.com/streamnative/private-cloud/main/quick-start/pulsar-cluster.yaml
Previous
Monitor