1. QuickStart guides

Install the Pulsar Operators using the Operator Lifecycle Manager

This document demonstrates how to install the Pulsar Operators using the Operator Lifecycle Manager (OLM), which is a part of the Operator Framework. The OLM provides a declarative way to install, manage, and upgrade operators on a Kubernetes cluster. StreamNative develops and maintains the Pulsar Operators' packages on the OperatorHub.

Prerequisites

  • Prepare a Kubernetes cluster (v1.24 or above)
  • Install kubectl (v1.24 or above), compatible with your cluster (+/- 1 minor release from your cluster).

Install the Pulsar Operators

  1. Install the OLM. The script automatically creates the olm namespace and the operators namespace.

    curl -sL https://github.com/operator-framework/operator-lifecycle-manager/releases/download/v0.23.1/install.sh | bash -s v0.23.1
    
  2. Install the Custom Resource Definitions (CRDs) and custom controllers for Pulsar, BookKeeper, and ZooKeeper. The controllers are deployed in the operators namespace by default.

    kubectl create -f https://raw.githubusercontent.com/streamnative/charts/master/examples/pulsar-operators/olm-subscription.yaml
    
  3. Verify that the Pulsar Operators are installed successfully.

    kubectl get all -n operators
    

    Note

    When you deploy the Pulsar Operators, the OLM first runs a Job in the olm namespace for each operator. You need to wait for the Jobs to finish before you can see the output.

    You should see the following output. The three custom controllers are running as Deployments, each having one Pod replica by default. The OLM exposes them internally through the ClusterIP service type, which means that they are reachable within the cluster.

    NAME                                                          READY   STATUS    RESTARTS   AGE
    pod/bookkeeper-operator-controller-manager-788bc4fd7b-gsndx   2/2     Running   0          48m
    pod/pulsar-operator-controller-manager-5b8d9785fc-47dcl       2/2     Running   0          48m
    pod/zookeeper-operator-controller-manager-58999c8584-cpnf7    2/2     Running   0          48m
    
    NAME                                                             TYPE        CLUSTER-IP      EXTERNAL-IP   PORT(S)    AGE
    service/bookkeeper-operator-controller-manager-metrics-service   ClusterIP   10.109.5.240    <none>        8443/TCP   48m
    service/pulsar-operator-controller-manager-metrics-service       ClusterIP   10.99.44.182    <none>        8443/TCP   51m
    service/zookeeper-operator-controller-manager-metrics-service    ClusterIP   10.101.118.19   <none>        8443/TCP   47m
    
    NAME                                                     READY   UP-TO-DATE   AVAILABLE   AGE
    deployment.apps/bookkeeper-operator-controller-manager   1/1     1            1           48m
    deployment.apps/pulsar-operator-controller-manager       1/1     1            1           48m
    deployment.apps/zookeeper-operator-controller-manager    1/1     1            1           48m
    
    NAME                                                                DESIRED   CURRENT   READY   AGE
    replicaset.apps/bookkeeper-operator-controller-manager-788bc4fd7b   1         1         1       48m
    replicaset.apps/pulsar-operator-controller-manager-5b8d9785fc       1         1         1       48m
    replicaset.apps/zookeeper-operator-controller-manager-58999c8584    1         1         1       48m
    
  4. View the created CRDs. These CRDs can be used to create CRs for Pulsar.

    kubectl get crds | grep streamnative
    

    You should see the following output:

    NAME                                            CREATED AT
    bookkeeperclusters.bookkeeper.streamnative.io   2023-03-02T08:52:52Z
    pulsarbrokers.pulsar.streamnative.io            2023-03-02T08:52:52Z
    pulsarproxies.pulsar.streamnative.io            2023-03-02T08:52:52Z
    zookeeperclusters.zookeeper.streamnative.io     2023-03-02T08:52:53Z
    
  5. View the ClusterServiceVersion (CSV) of these operators.

    kubectl get csv -n operators
    

    You should see the following output:

    NAME                          DISPLAY               VERSION   REPLACES                      PHASE
    bookkeeper-operator.v0.14.1   BookKeeper Operator   0.14.1    bookkeeper-operator.v0.12.4   Succeeded
    pulsar-operator.v0.14.1       Pulsar Operator       0.14.1    pulsar-operator.v0.12.4       Succeeded
    zookeeper-operator.v0.14.1    ZooKeeper Operator    0.14.1    zookeeper-operator.v0.12.4    Succeeded
    

    With the Pulsar Operators installed, you can use the controllers and the CRDs to deploy a Pulsar cluster.

Previous
Install Pulsar Operators using Helm chart