Cloud

rpk security secret create

Create a new secret for your Redpanda Cloud cluster.

Scopes define the areas where the secret can be used. Available options are: redpanda_connect, redpanda_cluster.

Usage

rpk security secret create [flags]

Examples

This section provides examples of how to use rpk security secret create.

Create a secret with a single scope

Create a secret and set its scope to redpanda_connect:

rpk security secret create --name NETT --value value --scopes redpanda_connect

Create a secret with multiple scopes

Set the scope to both redpanda_connect and redpanda_cluster:

rpk security secret create --name NETT2 --value value --scopes redpanda_connect,redpanda_cluster

You can also pass the scopes as a quoted string:

rpk security secret create --name NETT2 --value value --scopes "redpanda_connect,redpanda_cluster"

Flags

Value Type Description

--name

string

Name of the secret, must be uppercase and can only contain letters, digits, and underscores.

--scopes

stringSlice

Scope of the secret (for example, redpanda_connect).

--value

string

Value of the secret.

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.