rpk security secret create

Create a new secret for your cluster.

Scopes define the areas where the secret can be used. Available scopes are:

  • redpanda_connect

  • redpanda_cluster

You can set one or both scopes on a secret.

Usage

rpk security secret create [flags]

Examples

To create a secret and set its scope to redpanda_connect:

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

To 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 string:

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

Flags

Value Type Description

-h, --help

-

Help for create.

--name

string

Name of the secret (required). Must be in uppercase and can only contain letters, digits, and underscores.

--scopes

stringArray

Scope(s) of the secret, for example, redpanda_connect (required).

--value

string

Value of the secret (required).

--config

string

Redpanda or rpk config file. Default search paths are /var/lib/redpanda/.config/rpk/rpk.yaml, $PWD/redpanda.yaml, and /etc/redpanda/redpanda.yaml.

-X, --config-opt

stringArray

Override rpk configuration settings. See rpk -X or run rpk -X help for inline detail or rpk -X list for terser detail.

--profile

string

rpk profile to use.

-v, --verbose

-

Enable verbose logging.