rpk profile create
Create an rpk profile
.
There are multiple ways to create a profile. A name must be provided if not using --from-cloud
or --from-rpk-container
.
-
You can use
--from-redpanda
to generate a new profile from an existingredpanda.yaml
file. The special valuecurrent
creates a profile from the currentredpanda.yaml
as it is loaded withinrpk
. -
You can use
--from-rpk-container
to generate a profile from an existing cluster created usingrpk container start
command. The name is not needed when using this flag. -
You can use
--from-profile
to generate a profile from an existing profile or from from a profile in a yaml file. First, the filename is checked, then an existing profile name is checked. The special valuecurrent
creates a new profile from the existing profile with any active environment variables or flags applied. -
You can use
--from-cloud
to generate a profile from an existing cloud cluster ID. Note that you must be logged in withrpk cloud login
first. The special valueprompt
will prompt to select a cloud cluster to create a profile for. -
You can use
--set key=value
to directly set fields. The key can either be the name of a-X
flag or the path to the field in the profile’s YAML format. For example, using--set tls.enabled=true
OR--set kafka_api.tls.enabled=true
is equivalent. The former corresponds to the-X
flagtls.enabled
, while the latter corresponds to the pathkafka_api.tls.enabled
in the profile’s YAML.
The --set
flag is always applied last and can be used to set additional fields
in tandem with --from-redpanda
or --from-cloud
.
The --set
flag supports autocompletion, suggesting the -X
key format. If you
begin writing a YAML path, the flag will suggest the rest of the path.
It is recommended to always use the --description
flag; the description is
printed in the output of rpk profile list
.
Once the command completes successfully, rpk
switches to the newly created profile.
Flags
Value | Type | Description |
---|---|---|
|
string |
Optional description of the profile. |
|
string |
[="prompt"] Create and switch to a new profile generated from a Redpanda Cloud cluster ID. |
|
string |
Create and switch to a new profile from an existing profile or from a profile in a yaml file. |
|
string |
Create and switch to a new profile from a
|
|
- |
Create and switch to a new profile generated from a running cluster created with |
|
- |
Help for create. |
|
strings |
Create and switch to a new profile, setting profile fields with key=value pairs. |
|
string |
Redpanda or rpk config file; default search paths are |
|
stringArray |
Override |
|
string |
Profile to use. See |
|
- |
Enable verbose logging. |