Creating Secrets
To create a secret, use thekonduktor secret create
command shown below. If a secret with the same name already exists under your ownership, the new data will be merged with the existing contents rather than replacing it. If you need to replace a secret entirely, delete the existing secret first, then create a new one. Different users in the same cluster can create secrets with the same name without conflict as each user’s secrets are functionally isolated.
[FLAGS]
include:
1. kind=default
Use this kind to create general-purpose secrets that will be mounted directly into your pods as files or directories. Any of the three source flags are acceptable. Excluding the--kind
flag will default to --kind=default
.
$KONDUKTOR_DEFAULT_SECRETS/<SECRET_NAME>/
. Here is an example snippet of a workload yaml accessing the various default secrets:
2. kind=git-ssh
Use this kind to store an SSH private key for accessing Git repositories via SSH. You must use--from-file
. A user is limited to only one git-ssh secret.
GIT_SSH_COMMAND
, allowing secure Git operations. Here is an example snippet of a workload yaml:
3. kind=env
Use this kind to store environment variables directly. Environment secrets are automatically injected as environment variables. You must use--inline
to define key-value pairs directly on the CLI.