Introducing Pulsar Resources Operator for Kubernetes
We are excited to announce the release of Pulsar Resources Operator as an open-source project under the Apache License V2. The Pulsar Resources Operator provides declarative management of key Pulsar resources on Kubernetes.
What is the Pulsar Resources Operator?
The Pulsar Resources Operator is an independent controller that automatically manages Pulsar resources on Kubernetes using manifest files. The Pulsar Resources Operator provides full lifecycle management for the following Pulsar resources, including creation, update, and deletion:
Why do you need the Pulsar Resources Operator?
While you can manage Pulsar resources with CLI tools such as pulsar-admin and pulsarctl, or a client SDK, these are not the best practice when you are running a Pulsar cluster on Kubernetes. It’s very easy and useful to create a Pulsar resource by applying its manifest files, especially if you want to initialize some basic Pulsar resources in your CI workflow when creating a new Pulsar cluster.
Get started with the Pulsar Resources Operator
You can install the Pulsar Resources Operator using the officially supported pulsar-resources-operator Helm chart. It provides Custom Resource Definitions (CRDs) and Controllers to manage Pulsar resources.
Prerequisites
- Install kubectl (v1.16 - v1.24), compatible with your cluster (+/- 1 minor release from your cluster).
- Install Helm (v3.0.2 or higher).
- Prepare a Kubernetes cluster (v1.16 - v1.24).
- Prepare a Pulsar cluster.
Steps
To install the Pulsar Resources Operator, perform the following steps.
- Add the StreamNative chart repository.
2. Install the operator using the pulsar-resources-operator Helm chart.
- When you want to upgrade the operator, use the following commands. You need to pull the chart file, decompress the tgz file, and then apply the crds.
For more details about the installation, see the Installation section on GitHub.
Create the PulsarConnection
The PulsarConnection covers the address of the Pulsar cluster and the authentication information. The Operator uses it to access the Pulsar cluster to create other resources.
To create the PulsarConnection:
- Define a connection named pulsar-connection that contains the fields shown in the file below.
- Apply the YAML file to create the PulsarConnection and check the status.
Create Pulsar resources
The Pulsar Resources Operator allows you to quickly create Pulsar resources (for example, PulsarTenant and PulsarNamespace) on Kubernetes using YAML files. The following example demonstrates how to create a PulsarTenant object on Kubernetes.
- Create a YAML file named pulsar-tenant that contains the fields shown below.
2. Apply the YAML file to create the tenant and check the status.
More resources
Check out the following resources to learn more about the Pulsar Resources Operator.
- Documentation. See the GitHub repository and tutorials to understand different configurations of the Pulsar resources.
- Contact us. Feel free to create an issue on GitHub, send emails to the Pulsar mailing list, or message us on Twitter to get answers from Pulsar experts.
Newsletter
Our strategies and tactics delivered right to your inbox