To evaluate the services Banzai Cloud Supertubes offers, we recommend to create a test environment and use our demo cluster. This way you can start over any time, and try all the options you are interested in without having to worry about changes made to your existing environment, even if it’s not used in production.
Production installation is very similar, but of course you won’t need to deploy the demo cluster, and you must exactly specify which components you want to use.
Prerequisites π︎
Before deploying Supertubes on your cluster, complete the following tasks.
Create a test cluster π︎
You need a Kubernetes cluster to test Supertubes with. If you don’t already have a Kubernetes cluster to work with, create one with one of the following methods:
CAUTION:
Make sure that your Kubernetes cluster has sufficient resources.
- The requirements can be as high as 12 CPUs and 20 GiB of RAM if you try all the features with our demo cluster, and heavily depend on the workload.
- The minimum requirements are 9 CPUs and 10 GiB of RAM on a local machine. If you are testing on a cluster at a cloud provider, use nodes that have at least 4 CPUs (for example, c5.xlarge on AWS).
- You can use the self-hosted or the free online version of Banzai Cloud Pipeline to deploy a cluster.
- Deploy a single-node Banzai Cloud PKE cluster on a physical or virtual Linux box.
- Launch a cluster at one of the many cloud providers’ managed offerings at their console.
- Use KinD on your machine (make sure to increase the resource allocation of Docker for Mac).
Note: KinD does not support LoadBalancers, therefore you won’t be able to test external listeners.
Install the Supertubes tool π︎
Install the Supertubes command-line tool. You can use the Supertubes CLI tool to install Supertubes and other components to your cluster.
Note: The Supertubes CLI supports macOS and Linux (x86_64). It may work on Windows natively, but we don’t test it.
-
Install the
supertubes-cli
package for your environment by running the following command:curl https://getsupertubes.sh | sh
For other options, see the Supertubes CLI Installation Guide.
Set Kubernetes configuration and context π︎
The command-line tool uses your current Kubernetes context, from the file named in the KUBECONFIG
environment variable (~/.kube/config
by default). Check if this is the cluster you plan to deploy the product by running the following command: kubectl config get-contexts
If there are multiple contexts in the Kubeconfig file, specify the one you want to use with the use-context
parameter, for example: kubectl config use-context <context-to-use>
If the cluster is managed by Banzai Cloud Pipeline, complete the following steps. For more detailed instructions, see the Banzai Cloud Pipeline documentation.
- Login to your Pipeline instance (for example, by running banzai login --endpoint https://try.pipeline.banzai.cloud/pipeline).
- Run banzai cluster shell, and select the cluster to use. A subshell with the correct environment will open automatically.
Deploy Supertubes π︎
After you have completed the Prerequisites, you can install Supertubes on a single cluster.
-
Run the following command. It will install the Kafka operator and all dependencies (for example, Prometheus).
supertubes install -a
If the above command fails, for example, with a timeout, simply re-run the command.
Note: the supertubes install -a command assumes that there is a default storage class available on the cluster, to provision the needed volumes. If your Kubernetes environment doesnβt have a default storage class, then the CRs deployed by Supertubes must be adjusted in order to work in your environment. In that case, request a demo and describe your use case so we can guide you through the configuration details as part of the demo.
-
Verify that the Kafka cluster is running:
supertubes cluster get -n kafka --kafka-cluster kafka -c <path-to-k8s-cluster-kubeconfig-file>
Expected output:
Namespace Name State Image Alerts Cruise Control Topic Status Rolling Upgrade Errors Rolling Upgrade Last Success kafka kafka ClusterRunning banzaicloud/kafka:2.13-2.6.0-bzc.1 0 CruiseControlTopicReady 0
-
Create a topic with one partition and a replication factor of one.
supertubes cluster topic create -n kafka --kafka-cluster kafka -c <path-to-k8s-cluster-kubeconfig-file> -f- <<EOF apiVersion: kafka.banzaicloud.io/v1alpha1 kind: KafkaTopic metadata: name: test-topic spec: name: test-topic partitions: 3 replicationFactor: 2 config: "retention.ms": "28800000" "cleanup.policy": "delete" EOF
-
Write messages to the new topic.
kubectl apply -n kafka -f- <<EOF apiVersion: v1 kind: Pod metadata: name: kafkacat spec: containers: - name: kafka-test image: "solsson/kafkacat:alpine" # Just spin & wait forever command: [ "/bin/bash", "-c", "--" ] args: [ "while true; do sleep 3000; done;" ] EOF
kubectl exec -n kafka -it kafkacat bash kafkacat -b kafka-all-broker:29092 -P -t test-topic hello there
-
Verify that you can read back the messages, and which broker is the partition leader for test-topic.
kafkacat -b kafka-all-broker:29092 -C -t test-topic -c2 hello there
Expected output:
kafkacat -b kafka-all-broker:29092 -L -t test-topic Metadata for test-topic (from broker -1: kafka-all-broker:29092/bootstrap): 3 brokers: broker 0 at kafka-0.kafka.svc.cluster.local:29092 (controller) broker 2 at kafka-2.kafka.svc.cluster.local:29092 broker 1 at kafka-1.kafka.svc.cluster.local:29092 1 topics: topic "test-topic" with 1 partitions: partition 0, leader 2, replicas: 2, isrs: 2
-
Open the Supertubes Dashboard web interface to check the status of your Kafka cluster.
supertubes dashboard
The Supertubes web interface opens in your browser.