rpk container start

Start a local container cluster.

This command uses Docker to initiate a local container cluster. Use the --nodes (or the shorthand version -n) flag to specify the number of brokers.

The initial broker starts on default ports, with subsequent brokers' ports offset by 1000. You can use the following flags to specify listener ports:

  • --kafka-ports

  • --admin-ports

  • --rpc-ports

  • --schema-registry-ports

  • --proxy-ports

Each flag accepts a comma-separated list of ports for your listeners. Use the --any-port flag to let rpk randomly select an available port on the host machine.

In case of IP address pool conflict, you may specify a custom subnet and gateway using the --subnet and --gateway flags respectively.

By default, this command uses the redpandadata/redpanda:latest Redpanda container image. You can specify a container image by using the --image flag. See the available images at Docker Hub.

Usage

rpk container start [flags]

Examples

Start a three-broker cluster:

rpk container start -n 3

Start a single-broker cluster, selecting random ports for every listener:

rpk container start --any-port

Start a 3-broker cluster, selecting the seed kafka and console port only:

rpk container start --kafka-ports 9092 --console-port 8080

Start a three-broker cluster, specifying the Admin API port for each broker:

rpk container start --admin-ports 9644,9645,9646

Flags

Value Type Description

--admin-ports

strings

Redpanda Admin API ports to listen on; check help text for more information.

--any-port

-

Opt in for any (random) ports in all listeners.

--console-image

string

An arbitrary Redpanda Console container image to use (default redpandadata/console:latest).

--console-port

string

Redpanda Console ports to listen on; check help text for more information (default 8080).

--gateway

string

Gateway IP address for the subnet. Must be in the subnet address range (default 172.24.1.1).

-h, --help

-

Help for start.

--image

string

An arbitrary container Redpanda image to use (default redpandadata/redpanda:v24.2.2).

--kafka-ports

strings

Kafka protocol ports to listen on; check help text for more information.

--no-profile

-

If true, rpk will not create an rpk profile after creating a cluster.

-n, --nodes

uint

The number of brokers (nodes) to start (default 1).

--proxy-ports

strings

HTTP Proxy ports to listen on; check help text for more information.

--pull

-

Force pull the container image used.

--retries

uint

The amount of times to check for the cluster before considering it unstable and exiting (default 10).

--rpc-ports

strings

RPC ports to listen on; check help text for more information.

--schema-registry-ports

strings

Schema Registry ports to listen on; check help text for more information.

--subnet

string

Subnet to create the cluster network on (default 172.24.1.0/24).

--config

string

Redpanda or rpk config file; default search paths are /var/lib/redpanda/.config/rpk/rpk.yaml, $PWD/redpanda.yaml, and /etc/redpanda/redpanda.yaml.

-X, --config-opt

stringArray

Override rpk configuration settings. See rpk -X or execute rpk -X help for inline detail or rpk -X list for terser detail.

--profile

string

Profile to use. See rpk profile for more details.

-v, --verbose

-

Enable verbose logging.