Deploy a Local Development Cluster with kind or minikube

Deploy a local Redpanda cluster with Redpanda Console using the Helm chart. Explore the essentials of how Redpanda works in Kubernetes and what components are deployed by default. Then, use rpk both as an internal client and an external client to interact with your Redpanda cluster from the command line.

Looking for the Redpanda Operator?

If you’re an existing user of the Redpanda Operator, see the Redpanda Operator documentation.

Redpanda recommends the Helm chart for new users and for those who are getting started. The Redpanda Operator is for experienced users. The Redpanda Operator was built for Redpanda Cloud and has unique features and workflows for that specific use case.


Before you begin, make sure that you have the correct software for your Kubernetes platform:

  • All platforms

  • kind

  • minikube

  • kubectl. Minimum required Kubernetes version: 1.21

    kubectl version --short --client
  • Helm. Minimum required Helm version: 3.6.0

    helm version

Create a Kubernetes cluster

In this step, you create one master and three worker nodes (one worker node for each Redpanda broker).

  • kind

  • minikube

  1. Define a cluster in the kind.yaml configuration file:

    cat <<EOF >kind.yaml
    kind: Cluster
      - role: control-plane
      - role: worker
      - role: worker
      - role: worker
  2. Create the Kubernetes cluster from the configuration file:

    kind create cluster --config kind.yaml
  1. Create the Kubernetes cluster:

    minikube start --namespace redpanda --nodes 4
  2. Prevent applications from being scheduled on the Kubernetes control plane node:

    kubectl taint node \
        -l"" \

Deploy Redpanda and Redpanda Console

In this step, you deploy Redpanda with self-signed TLS certificates. Redpanda Console is included as a subchart in the Redpanda Helm chart.

  1. Add the Redpanda Helm chart repository and install cert-manager using Helm:

    helm repo add redpanda
    helm repo add jetstack
    helm repo updatehelm install cert-manager jetstack/cert-manager  --set installCRDs=true --namespace cert-manager  --create-namespace

    The Redpanda Helm chart uses cert-manager to manage TLS certificates.

  2. Install Redpanda using Helm:

    export DOMAIN=customredpandadomain.local && \
    helm repo add redpanda
    helm repo update
    helm install redpanda redpanda/redpanda \
      --namespace redpanda \
      --create-namespace \
      --set external.domain=${DOMAIN}

    The installation displays some tips for getting started.

  3. Wait for the Redpanda cluster to be ready:

    kubectl -n redpanda rollout status statefulset redpanda --watch

    When the Redpanda cluster is ready, the output should look similar to the following:

    statefulset rolling update complete 3 pods at revision redpanda-8654f645b4...

    If your cluster remains in a pending state, see Troubleshooting.

Start streaming

Each Redpanda broker comes with rpk, which is a CLI tool for connecting to and interacting with Redpanda brokers. You can use rpk inside one of the Redpanda broker’s Docker containers to create a topic, produce messages to it, and consume messages from it.

  1. Create an alias to simplify the rpk commands:

    alias rpk-topic="kubectl -n redpanda exec -i -t redpanda-0 -c redpanda -- rpk topic --brokers redpanda-0.redpanda.redpanda.svc.cluster.local.:9093,redpanda-1.redpanda.redpanda.svc.cluster.local.:9093,redpanda-2.redpanda.redpanda.svc.cluster.local.:9093 --tls-truststore /etc/tls/certs/default/ca.crt --tls-enabled"
  2. Create a topic called twitch_chat:

    rpk-topic create twitch_chat
    TOPIC       STATUS
    twitch_chat OK
  3. Describe the topic:

    rpk-topic describe twitch_chat
  4. Produce a message to the topic:

    rpk-topic produce twitch_chat
  5. Type a message, then press Enter:

    Pandas are fabulous!
    Produced to partition 0 at offset 0 with timestamp 1663282629789.
  6. Press Ctrl+C to finish producing messages to the topic.

  7. Consume one message from the topic:

    rpk-topic consume twitch_chat --num 1

    Your message is displayed along with its metadata.

Explore your topic in Redpanda Console


Configure external access to the Redpanda brokers

Because external clients are not in the Kubernetes cluster where the Redpanda brokers are running, they cannot resolve the internal addresses of the headless ClusterIP Service. Instead, Redpanda brokers must also advertise an externally accessible address that external clients can connect to.

When you created the cluster, you set the external.domain configuration to customredpandadomain.local, which means that your Redpanda brokers are advertising the following addresses:

  • redpanda-0.customredpandadomain.local

  • redpanda-1.customredpandadomain.local

  • redpanda-2.customredpandadomain.local

To access your Redpanda brokers externally, you can map your worker nodes' IP addresses to these domains.

IP addresses can change. If the IP addresses of your worker nodes change, you must update your /etc/hosts file with the new mappings.
  • Linux

  • macOS

  • Windows

  1. Add mappings in your /etc/hosts file between your worker nodes' IP addresses and their custom domain names:

sudo true && kubectl -n redpanda get endpoints,node -A -o go-template='{{ range $_ := .items }}{{ if and (eq .kind "Endpoints") (eq "redpanda-external") }}{{ range $_ := (index .subsets 0).addresses }}{{ $nodeName := .nodeName }}{{ $podName := }}{{ range $node := $.items }}{{ if and (eq .kind "Node") (eq $nodeName) }}{{ range $_ := .status.addresses }}{{ if eq .type "InternalIP" }}{{ .address }} {{ $podName }}.${DOMAIN}{{ "\n" }}{{ end }}{{ end }}{{ end }}{{ end }}{{ end }}{{ end }}{{ end }}' | envsubst | sudo tee -a /etc/hosts

+ ./etc/hosts redpanda-0.customredpandadomain.local redpanda-1.customredpandadomain.local redpanda-2.customredpandadomain.local
  1. Save the root certificate authority (CA) to your local file system outside Kubernetes:

    kubectl -n redpanda get secret redpanda-default-root-certificate -o go-template='{{ index .data "ca.crt" | base64decode }}' > ca.crt
  2. Install rpk on your local machine, not on a Pod:

  3. Download the rpk archive for Linux:

    curl -LO
  4. Ensure that you have the folder ~/.local/bin:

    mkdir -p ~/.local/bin
  5. Add it to your $PATH:

    export PATH="~/.local/bin:$PATH"
  6. Unzip the rpk files to your ~/.local/bin/ directory:

    unzip -d ~/.local/bin/
  7. Run rpk version to display the version of the rpk binary:

    rpk version
    22.3.11 (rev 9eefb907c)
  8. Set the REDPANDA_BROKERS environment variable to the custom domains of your Redpanda brokers:

    export REDPANDA_BROKERS=redpanda-0.customredpandadomain.local:31092,redpanda-1.customredpandadomain.local:31092,redpanda-2.customredpandadomain.local:31092
    31092 is the Kafka API port that’s exposed by the default NodePort Service.
  9. Describe the topic:

    rpk topic describe twitch_chat --tls-enabled --tls-truststore=ca.crt

On macOS, the kind tool is meant for local testing. To test external access, use GKE, EKS, or AKS.

On Windows, the kind tool is meant for local testing. To test external access, use GKE, EKS, or AKS.

Explore the default Kubernetes components

By default, the Redpanda Helm chart deploys the following Kubernetes components:


Redpanda is a stateful application. Each Redpanda broker needs to store its own state (topic partitions) in its own storage volume. As a result, the Helm chart deploys a StatefulSet to manage the Pods in which the Redpanda brokers are running.

kubectl get statefulset -n redpanda
redpanda   3/3     3m11s

StatefulSets ensure that the state associated with a particular Pod replica is always the same, no matter how often the Pod is recreated. Each Pod is also given a unique ordinal number in its name such as redpanda-0. A Pod with a particular ordinal number is always associated with a PersistentVolumeClaim with the same number. When a Pod in the StatefulSet is deleted and recreated, it is given the same ordinal number and so it mounts the same storage volume as the deleted Pod that it replaced.

kubectl get pod -n redpanda
NAME                              READY   STATUS      RESTARTS        AGE
redpanda-0                        1/1     Running     0               6m9s
redpanda-1                        1/1     Running     0               6m9s
redpanda-2                        1/1     Running     0               6m9s
redpanda-console-5ff45cdb9b-6z2vs 1/1     Running     0               5m
redpanda-configuration-smqv7      0/1     Completed   0               6m9s

The redpanda-configuration Job updates the Redpanda runtime configuration.


Redpanda brokers must be able to store their data on disk. By default, the Helm chart uses the default StorageClass in the Kubernetes cluster to create a PersistentVolumeClaim for each Pod. The default StorageClass in your Kubernetes cluster depends on the Kubernetes platform that you are using.

kubectl get persistentvolumeclaims -n redpanda
NAME                 STATUS   VOLUME                                     CAPACITY   ACCESS MODES   STORAGECLASS   AGE
datadir-redpanda-0   Bound    pvc-3311ade3-de84-4027-80c6-3d8347302962   20Gi       RWO            standard       75s
datadir-redpanda-1   Bound    pvc-4ea8bc03-89a6-41e4-b985-99f074995f08   20Gi       RWO            standard       75s
datadir-redpanda-2   Bound    pvc-45c3555f-43bc-48c2-b209-c284c8091c45   20Gi       RWO            standard       75s


The clients writing to or reading from a given partition have to connect directly to the leader broker that hosts the partition. As a result, clients needs to be able to connect directly to each Pod. To allow internal and external clients to connect to each Pod that hosts a Redpanda broker, the Helm chart configures two Services:

kubectl get service -n redpanda
NAME                TYPE        CLUSTER-IP      EXTERNAL-IP   PORT(S)                                                       AGE
redpanda            ClusterIP   None            <none>        <none>                                                        5m37s
redpanda-console    ClusterIP    <none>        8080                                                          5m
redpanda-external   NodePort   <none>        9644:31644/TCP,9094:31092/TCP,8083:30082/TCP,8080:30081/TCP   5m37s

Headless ClusterIP Service

The headless Service associated with a StatefulSet gives the Pods their network identity in the form of a fully qualified domain name (FQDN). Both Redpanda brokers in the same Redpanda cluster and clients within the same Kubernetes cluster use this FQDN to communicate with each other.

An important requirement of distributed applications such as Redpanda is peer discovery: The ability for each broker to find other brokers in the same cluster. When each Pod is rolled out, its seed_servers field is updated with the FQDN of each Pod in the cluster so that they can discover each other.
kubectl -n redpanda exec redpanda-0 -c redpanda -- cat etc/redpanda/redpanda.yaml
  data_directory: /var/lib/redpanda/data
  empty_seed_starts_cluster: false
    - host:
      address: redpanda-0.redpanda.redpanda.svc.cluster.local.
      port: 33145
    - host:
      address: redpanda-1.redpanda.redpanda.svc.cluster.local.
      port: 33145
    - host:
      address: redpanda-2.redpanda.redpanda.svc.cluster.local.
      port: 33145

NodePort Service

External access is made available by a NodePort service that opens the following ports by default for the listeners:

Node port Pod port Listener



Schema Registry



HTTP Proxy



Kafka API



Admin API

TLS Certificates

By default, TLS is enabled in the Redpanda Helm chart. The Helm chart uses cert-manager to generate two Certificate resources that provide Redpanda with self-signed certificates:

  • The redpanda-default-cert Certificate is the TLS certificate that is used by all listeners.

  • The redpanda-default-root-certificate Certificate is the root certificate authority for the TLS certificates.

kubectl get certificate -n redpanda
NAME                                 READY   SECRET                               AGE
redpanda-default-cert                True    redpanda-default-cert                10m
redpanda-default-root-certificate    True    redpanda-default-root-certificate    10m


Before troubleshooting your cluster, make sure that you have all the prerequisites.

For troubleshooting steps, see Troubleshoot Redpanda in Kubernetes.

Next steps

When you’re ready to use a registered domain, make sure to remove your entries from the /etc/hosts file, and see Configure External Access through a NodePort Service

Suggested reading