R
Runpod2y ago
JanE

how to route docker secrets to pod automatically

I have some credentials saved as runpod secrets. After creating a new pod using runpodctl, I manually have to add the secrets to the pod. Is there a way to have the secrets available in the pod, without manually adding them?
6 Replies
JanE
JanEOP2y ago
Hi there, I just wanted to see if meanwhile maybe thre is somebody willing to give some advice?
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
digigoblin
digigoblin2y ago
You have to add it as an environment variable then access it from the environment variable eg: my_super_secret = "password" then add env variable called: MY_SUPER_SECRET : RUNPOD_SECRET_my_super_secret then access MY_SUPER_SECRET environment variable to get the secret.
JanE
JanEOP2y ago
Thanks for answering! @digigoblin you mean adding the environment variables here (see pic) There is no other way to inject the env variables?
No description
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
digigoblin
digigoblin2y ago
Yeah not sure whether they are automatically injected as environment variables but I assume not because that could potentially expose secrets to a pod that you don't want them exposed to. Oh my bad that doesn't work add env variable called: RUNPOD_SECRET_SUPER_SECRET : {{ RUNPOD_SECRET_my_super_secret }} then access RUNPOD_SECRET_SUPER_SECRET environment variable to get the secret. Secret docs could be better I have to admit

Did you find this page helpful?