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. |
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 |
|---|---|---|
|
stringArray |
tag to set, KEY=VALUE ( |
|
string |
secret value, inline. Visible in shell history and the process list; prefer |
|
string |
read the secret value from a file, or "-" for stdin. One trailing newline is stripped. |
Global flags
| Value | Type | Description |
|---|---|---|
|
string |
Redpanda or |
|
stringArray |
Override |
|
bool |
Ignore |
|
string |
|
|
bool |
Enable verbose logging. |