Scale Redpanda in Kubernetes

Scaling a Redpanda cluster involves increasing its resources and/or the number of nodes to handle more data, traffic, and users. You can scale a Redpanda cluster both vertically and horizontally, depending on your requirements.

Vertical Scaling

Vertical (also known as scaling up/down) scaling means increasing the resources, such as CPU cores, memory, and storage, of existing brokers in the cluster.

To scale vertically, see Manage Pod Resources in Kubernetes.

You cannot decrease the number of CPU cores in a running cluster.

Horizontal Scaling

Horizontal scaling (also known as scaling out/in) means adding more brokers to the cluster, thereby distributing the load and data across different worker nodes.

  1. If you’re scaling out, make sure that you have one additional worker node for each Redpanda broker that you want to add.

  2. Update the number of replicas in the Helm chart:

    • --values

    • --set

      replicas: <number-of-replicas>
    helm upgrade --install redpanda redpanda/redpanda -n redpanda --create-namespace \
      --values replicas.yaml --reuse-values
    helm upgrade --install redpanda redpanda/redpanda -n redpanda --create-namespace \
      --set statefulset.replicas=<number-of-replicas>
  3. Verify that your Redpanda cluster has the desired number of replicas:

    kubectl get statefulsets -n redpanda