secret
The create secret command creates a new Secret in the Kubernetes cluster to store sensitive data. This command allows specifying key–value pairs, secret type, and associated namespace. Values must be base64-encoded before being stored in the Secret.
Usage
cldkctl create secret [flags]Steps
Follow the steps below to run and view the result of this command:
You can create a Secret either by opening the built-in editor or by using a YAML configuration file.
To open the editor, run:
cldkctl create secretThe Secret manifest will open in your default text editor (default: vim). Edit the configuration as needed, then save and close the file to apply the changes.

Alternatively, if you prefer to create the Secret by preparing a YAML file beforehand, first identify the sensitive data (for example, username and password) that you want to store in the Secret.
Encode each value using base64.
Prepare a YAML file that defines the Secret configuration, and include the base64-encoded values inside it.
Save this file in the same directory where you will run the cldkctl command.
Use the --file flag to point to the YAML file.
(Optional) To specify a namespace or project, add the --default-namespace or --project flag.
Run the following command in your terminal:
Replace [secret file name] with the path to your YAML configuration file.
Once completed successfully, a message “✓ Secret created” will appear in your terminal.

Flags
-h, --help
Help for create secret command.
Last updated
