rpk profile create
Create a new rpk profile with connection settings for a Redpanda cluster.
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-redpandato generate a new profile from an existingredpanda.yamlfile. The special valuecurrentcreates a profile from the currentredpanda.yamlas it is loaded withinrpk. -
You can use
--from-rpk-containerto generate a profile from an existing cluster created usingrpk container startcommand. The name is not needed when using this flag. -
You can use
--from-profileto generate a profile from an existing profile or from a profile in ayamlfile. First, the filename is checked, then an existing profile name is checked. The special valuecurrentcreates a new profile from the existing profile with any active environment variables or flags applied. -
You can use
--from-cloudto generate a profile from an existing cloud cluster ID. Note that you must be logged in withrpk cloud loginfirst. The special valuepromptwill prompt to select a cloud cluster to create a profile for. -
For serverless clusters that support both public and private networking, you will be prompted to select a network type unless you specify
--serverless-network. To avoid prompts in automation, explicitly set--serverless-networktopublicorprivate. -
You can use
--set key=valueto directly set fields. The key can either be the name of a-Xflag or the path to the field in the profile’s YAML format. For example, using--set tls.enabled=trueOR--set kafka_api.tls.enabled=trueis equivalent.
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 |
Create profile from Redpanda Cloud cluster. Automatically configures authentication and connection settings. |
|
string |
Create and switch to a new profile from an existing profile or from a profile in a |
|
string |
Create and switch to a new profile from a |
|
bool |
Create and switch to a new profile generated from a running cluster created with |
|
string |
Networking type for serverless clusters: |
|
stringArray |
Set a profile configuration field. Format: |
Global flags
| Value | Type | Description |
|---|---|---|
|
string |
Redpanda or |
|
stringArray |
Override |
|
bool |
Ignore |
|
string |
|
|
bool |
Enable verbose logging. |