rpk container start

Start a local container cluster.

This command uses Docker to initiate a local Redpanda container cluster, including Redpanda Console. Use the --nodes/-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 listeners flag to specify ports:

  • --kafka-ports

  • --admin-ports

  • --rpc-ports

  • --schema-registry-ports

  • --proxy-ports

  • --console-port

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

By default, this command uses the redpandadata/redpanda:latest and redpandadata/console:latest container images. You can specify a container image by using the --image flag.

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

Usage

rpk container start [flags]

Examples

This section provides examples of how to use rpk container start.

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

stringSlice

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

--any-port

bool

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

--console-image

string

An arbitrary Redpanda Console container image to use.

--console-port

string

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

--gateway

string

Gateway IP address for the subnet. Must be in the subnet address range.

--image

string

An arbitrary Redpanda container image to use.

--kafka-ports

stringSlice

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

--no-profile

bool

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

-n, --nodes

uint

The number of brokers (nodes) to start.

--proxy-ports

stringSlice

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

--pull

bool

Force pull the container image used.

--retries

uint

The number of times to check for the cluster before considering it unstable and exiting.

--rpc-ports

stringSlice

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

--schema-registry-ports

stringSlice

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

--set

string

Redpanda configuration property to set upon start. Follows rpk redpanda config set format.

--subnet

string

Subnet to create the cluster network on.

Global flags

Value Type Description

--config

string

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

-X, --config-opt

stringArray

Override rpk configuration settings; -X help for detail or -X list for terser detail.

--ignore-profile

bool

Ignore rpk.yaml and redpanda.yaml; use default settings.

--profile

string

rpk profile to use.

-v, --verbose

bool

Enable verbose logging.