Use secrets in your deployments for sensitive information
password=my_pa"ss"word
, you should use tensorkube secret create dummy-secret password=my_pa\"ss\"word
.
Doing this will let you store actual value which is password=my_pa"ss"word
.--secret
flag in the deploy command. Secrets are exposed
as environment variables in your deployed code.
secret
in Dockerfile. You would need to
specify the following RUN
command before the step where you want to use the secret.
KEY1
as id
and env
values in the --mount
flag. ** Do not use the secret name as the key name.**
Also, do not forget to deploy the service with the --secret
flag to make the secret available during both build and runtime.
Create a secret
Create a Dockerfile
Deploy with the secret flag
KEY1
from secret1
during build:
If you have multiple secrets, you can mount them as follows:
Add the github token as a secret
Mount the secret in Dockerfile
GITHUB_TOKEN
here, which was the KEY
of our secret insread of github-secrets
which was the secret name.