StreamNative Platform is a cloud-native messaging and event-streaming platform that enables you to build a real-time application and data infrastructure for both real-time and historical events. In this article, I will demonstrate how to install StreamNative Platform on minikube on a local machine to explore it with the lightweight Kubernetes distribution, and deploy Pulsar on it. I will perform all the steps on a Mac computer with Apple silicon.
This setup mainly required DFD (Docker for Desktop). You can download the dmg file for Mac.
minikube is a lightweight Kubernetes distribution that allows you to quickly create a local Kubernetes cluster. For educational purposes, we will use minikube in this blog to set up our environment with Kubernetes 1.23 as an example.
1. Download and install minikube using the following commands.
Pulsar Operators will be installed later, which support Kubernetes versions between v1.16 (inclusive) and v1.26 (exclusive).
3. Set the default context to minikube.
kubectl config use-context minikube
4. Create a Kubernetes namespace called pulsar. As we are going to install everything under the same namespace, we can set the default context to the pulsar namespace. This allows us to perform operations in the pulsar namespace by default without using the -n option every time.
To fully leverage the power of StreamNative Platform, you can choose to install the Vault operator, cert-manager, and Function Mesh operator. For more information, see the StreamNative Platform documentation.
Install Apache Pulsar
Now that we have installed Pulsar Operators, we can deployed the custom resources (CRs) of ZooKeeper, BookKeeper, and brokers on minikube.
To deploy these CRs, download the YAML files from this GitHub repository and apply them. Alternatively, follow the examples below to install and create Pods for each component. Install ZooKeeper first, then BookKeeper, and finally the Pulsar broker.
5. To access the cluster, you can exec into the broker Pod and run the producer or consumer client.
kubectl exec my-broker-0 -it bash
I have no name!@my-broker-0:/pulsar/bin$ ./pulsar-admin --admin-url http://localhost:8080 tenants list
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/pulsar/lib/org.slf4j-slf4j-log4j12-1.7.25.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/pulsar/lib/org.apache.logging.log4j-log4j-slf4j-impl-2.18.0.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
SLF4J: Actual binding is of type [org.slf4j.impl.Log4jLoggerFactory]
log4j:WARN No appenders could be found for logger (io.netty.util.internal.logging.InternalLoggerFactory).
log4j:WARN Please initialize the log4j system properly.
log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.
For the MacBook Pro M1 chip, make sure IPV6 is disabled. Always use the latest version of Docker Desktop and ensure the following settings are enabled before creating CRs.
Now, you can use pulsar-admin to manage clusters, tenants, namespaces, topics, and more.
*☁️ Happy Learning ☁️*
Powered by Apache Pulsar, StreamNative Platform makes it easy to build mission-critical messaging and streaming applications and real-time data pipelines by integrating data from multiple sources into a single, central messaging and event streaming platform for your company. See the following resources for more details:
Vikas Dadhich is a Customer Reliability Engineer at StreamNative. With more than ten years in customer operations and technical support engineering roles, he is able to work independently and in a team, with excellent leadership, communication, organizational, interpersonal, and time management abilities.