Installing Redpanda on Kubernetes
This guide helps you get started with Redpanda for development and testing on Kubernetes.
This page uses the latest recommended Helm chart for installing Redpanda. For information about installing Redpanda on Kubernetes using the older Redpanda Operator, see Redpanda Operator. |
Create a Kubernetes cluster
-
kind
-
minikube
-
Amazon EKS
-
Google GKE
Create the kind config file to create a multi-node cluster:
cat <<EOF >kind.yaml
---
apiVersion: kind.x-k8s.io/v1alpha4
kind: Cluster
nodes:
- role: control-plane
- role: worker
- role: worker
- role: worker
EOF
Create a Kubernetes cluster:
kind create cluster --config kind.yaml
Create a Kubernetes cluster:
minikube start --nodes 4
Prevent applications from being scheduled with the Kubernetes control plane:
kubectl taint node \
-l node-role.kubernetes.io/control-plane="" \
node-role.kubernetes.io/control-plane=:NoSchedule
Create an Elastic Kubernetes Service (EKS) cluster:
eksctl create cluster --name redpanda \
--nodegroup-name standard-workers \
--node-type m5.xlarge \
--nodes 3 \
--nodes-min 3 \
--nodes-max 4
Create a Google Kubernetes Engine (GKE) cluster:
gcloud container clusters create redpanda --machine-type n1-standard-4 --num-nodes=3
Use Helm to install Redpanda
Install Redpanda using Helm:
helm repo add redpanda https://charts.redpanda.com/
helm repo update
helm install redpanda redpanda/redpanda \
--namespace redpanda \
--create-namespace
The installation produces some notes with getting started tips:
NAME: redpanda LAST DEPLOYED: Wed Sep 14 17:08:43 2022 NAMESPACE: redpanda STATUS: deployed REVISION: 1 NOTES: Congratulations on installing redpanda! The pods roll out in a few seconds. To check the status, run: kubectl -n redpanda rollout status statefulset redpanda --watch Try some sample commands, like creating a topic called test-topic: Get the API status: kubectl -n redpanda exec -ti redpanda-0 -c redpanda -- rpk --brokers=redpanda-0.redpanda.redpanda.svc.cluster.local.:9093 cluster info Create a topic: kubectl -n redpanda exec -ti redpanda-0 -c redpanda -- rpk --brokers=redpanda-0.redpanda.redpanda.svc.cluster.local.:9093 topic create test-topic Describe the topic: kubectl -n redpanda exec -ti redpanda-0 -c redpanda -- rpk --brokers=redpanda-0.redpanda.redpanda.svc.cluster.local.:9093 topic describe test-topic Delete the topic: kubectl -n redpanda exec -ti redpanda-0 -c redpanda -- rpk --brokers=redpanda-0.redpanda.redpanda.svc.cluster.local.:9093 topic delete test-topic
Wait for the Redpanda cluster to be ready:
kubectl -n redpanda rollout status statefulset redpanda --watch
When it’s ready, the output should look similar to the following:
statefulset rolling update complete 3 pods at revision redpanda-8654f645b4...
Was this helpful?