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.
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 |
---|---|---|
|
strings |
Redpanda Admin API ports to listen on; check help text for more information. |
|
- |
Opt in for any (random) ports in all listeners. |
|
string |
An arbitrary Redpanda Console container image to use (default |
|
string |
Redpanda Console ports to listen on; check help text for more information (default |
|
string |
Gateway IP address for the subnet. Must be in the subnet address range (default |
|
- |
Help for start. |
|
string |
An arbitrary container Redpanda image to use (default |
|
strings |
Kafka protocol ports to listen on; check help text for more information. |
|
- |
If true, |
|
uint |
The number of brokers (nodes) to start (default |
|
strings |
HTTP Proxy ports to listen on; check help text for more information. |
|
- |
Force pull the container image used. |
|
uint |
The amount of times to check for the cluster before considering it unstable and exiting (default |
|
strings |
RPC ports to listen on; check help text for more information. |
|
strings |
Schema Registry ports to listen on; check help text for more information. |
|
string |
Subnet to create the cluster network on (default |
|
string |
Redpanda or |
|
stringArray |
Override |
|
string |
Profile to use. See |
|
- |
Enable verbose logging. |