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.
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 |
|---|---|---|
|
stringSlice |
Redpanda Admin API ports to listen on; check help text for more information. |
|
bool |
Opt in for any ( |
|
string |
An arbitrary Redpanda Console container image to use. |
|
string |
Redpanda console ports to listen on; check help text for more information. |
|
string |
Gateway IP address for the subnet. Must be in the subnet address range. |
|
string |
An arbitrary Redpanda container image to use. |
|
stringSlice |
Kafka protocol ports to listen on; check help text for more information. |
|
bool |
If true, |
|
uint |
The number of brokers ( |
|
stringSlice |
HTTP Proxy ports to listen on; check help text for more information. |
|
bool |
Force pull the container image used. |
|
uint |
The number of times to check for the cluster before considering it unstable and exiting. |
|
stringSlice |
RPC ports to listen on; check help text for more information. |
|
stringSlice |
Schema Registry ports to listen on; check help text for more information. |
|
string |
Redpanda configuration property to set upon start. Follows |
|
string |
Subnet to create the cluster network on. |
Global flags
| Value | Type | Description |
|---|---|---|
|
string |
Redpanda or |
|
stringArray |
Override |
|
bool |
Ignore |
|
string |
|
|
bool |
Enable verbose logging. |