- QuickStart guides
Upgrade the Pulsar Operators
If you install the Pulsar Operators using the Helm chart, you need to manually upgrade the Pulsar Operators. Helm does not upgrade Custom Resource Definitions (CRDs) when you use the helm upgrade
command. Therefore, you must manually upgrade the associated CRDs before upgrading the chart.
Note
If you use the Operator Lifecycle Manager (OLM) to install the Pulsar Operators, you don’t need to manually upgrade the Pulsar Operators. The OLM periodically checks if there is new version available and automatically upgrades the Pulsar Operators.
This document demonstrates how to upgrade the Pulsar Operators.
Prerequisites
- You have installed the Pulsar Operators using the Helm chart.
- Install Helm (v3.0.2 or above).
Steps
View the existing version of the Pulsar Operators running on your Kubernetes cluster.
helm ls -n <k8s-namespace> | grep pulsar-operator
The sample output shoule be as follows. Both the chart version and the application version are
0.14.0
.pulsar-operators operators 1 2023-03-13 17:19:01.754639 +0800 CST deployed pulsar-operator-0.14.0 0.14.0
View the latest available version of the Pulsar Operators.
helm repo update helm search repo streamnative/pulsar-operator --versions
You should see the following output:
NAME CHART VERSION APP VERSION DESCRIPTION streamnative/pulsar-operator 0.15.0 0.15.2 Apache Pulsar Operator Helm chart for Kubernetes streamnative/pulsar-operator 0.14.2 0.14.0 Apache Pulsar Operator Helm chart for Kubernetes streamnative/pulsar-operator 0.14.1 0.14.0 Apache Pulsar Operator Helm chart for Kubernetes streamnative/pulsar-operator 0.14.0 0.14.0 Apache Pulsar Operator Helm chart for Kubernetes
Upgrade the CRDs of the Pulsar Operators. The following commands upgrade the CRDs to their latest versions.
# Upgrade the broker CRD. kubectl replace -f https://raw.githubusercontent.com/streamnative/charts/master/charts/pulsar-operator/crds/pulsar.streamnative.io_pulsarbrokers.yaml # Upgrade the proxy CRD. kubectl replace -f https://raw.githubusercontent.com/streamnative/charts/master/charts/pulsar-operator/crds/pulsar.streamnative.io_pulsarproxies.yaml # Upgrade the BookKeeper CRD. kubectl replace -f https://raw.githubusercontent.com/streamnative/charts/master/charts/pulsar-operator/crds/bookkeeper.streamnative.io_bookkeeperclusters.yaml # Upgrade the ZooKeeper CRD. kubectl replace -f https://raw.githubusercontent.com/streamnative/charts/master/charts/pulsar-operator/crds/zookeeper.streamnative.io_zookeeperclusters.yaml
Upgrade the Pulsar Operators. This command deletes the existing Pods and creates new ones.
helm upgrade <release-name> -n <k8s-namespace> streamnative/pulsar-operator
Verify that the Pulsar Operators are upgraded successfully.
kubectl get pods -n <k8s-namespace>
You should see the following output:
NAME READY STATUS RESTARTS AGE pulsar-operators-bookkeeper-controller-manager-b469d56-xpzdq 1/1 Running 0 29s pulsar-operators-pulsar-controller-manager-596d6878d6-zb5q4 1/1 Running 0 29s pulsar-operators-zookeeper-controller-manager-67cdb945cb-cgj4d 1/1 Running 0 29s
View the version of Pulsar Operators.
helm ls -n <k8s-namespace> | grep pulsar-operator
The sample output shoule be as follows. The latest chart version and the application version have been installed.
pulsar-operators operators 2 2023-03-13 17:37:49.606714 +0800 CST deployed pulsar-operator-0.15.0 0.15.2