Agentic Data Plane

rpk ai secret create

Create a secret. Resources reference the secret by its ID, for example --openai-config.api-key-ref <id>.

The value is required. Pass it with --value-file, which takes a path or - for stdin, or with --value.

This command was introduced in ai version 0.2.92.

Usage

rpk ai secret create [flags]

Examples

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

printf %s "$OPENAI_API_KEY" | rpk ai secret create OPENAI_API_KEY --value-file -
rpk ai secret create GITHUB_TOKEN --value-file ./token.txt --tag team=ai

Flags

Value Type Description

--tag

stringArray

tag to set, KEY=VALUE (repeatable).

--value

string

secret value, inline. Visible in shell history and the process list; prefer --value-file.

--value-file

string

read the secret value from a file, or "-" for stdin. One trailing newline is stripped.

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.