Skip to content

Commit 1df3e39

Browse files
authored
Merge pull request #20 from runpod/secrets
Adds Secrets
2 parents cbd51bf + a6566af commit 1df3e39

File tree

2 files changed

+79
-0
lines changed

2 files changed

+79
-0
lines changed

docs/pods/templates/manage-templates.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,3 +40,5 @@ Use environment variables to pass configuration settings and secrets to your con
4040
![](/img/docs/b7670dd-image.png)
4141

4242
RunPod also provides a set of predefined [environment variables](/pods/references/environment-variables) that provide information about the pod, such as the unique identifier for your pod (`RUNPOD_POD_ID`), the API key used to make RunPod API calls to the specific pod (`RUNPOD_API_KEY`), the name of the host server the pod is running on (`RUNPOD_POD_HOSTNAME`), and more.
43+
44+
You can references [Secrets](/pods/templates/secrets) in your Pod templates.

docs/pods/templates/secrets.md

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
---
2+
title: Secrets
3+
description: Learn to manage Secrets in your Pods.
4+
sidebar_position: 4
5+
---
6+
7+
You can add Secrets to your Pods and templates.
8+
Secrets are encrypted strings of text that are used to store sensitive information, such as passwords, API keys, and other sensitive data.
9+
10+
## Create a Secret
11+
12+
You can create a Secret using the RunPod Web interface or the RunPod API.
13+
14+
1. Login into the RunPod Web interface and select [Secrets](https://www.runpod.io/console/user/secrets).
15+
2. Choose **Create Secret** and provide the following:
16+
1. **Secret Name**: The name of the Secret.
17+
2. **Secret Value**: The value of the Secret.
18+
3. **Description**: (optional) A description of the Secret.
19+
3. Select **Create Secret**.
20+
21+
:::note
22+
23+
Once a Secret is created, its value cannot be viewed.
24+
If you need to change the Secret, you must create a new one or [modify the Secret Value](#modify-a-secret).
25+
26+
:::
27+
28+
## Modify a Secret
29+
30+
You can modify an existing Secret using the RunPod Web interface.
31+
32+
1. Login into the RunPod Web interface and select [Secrets](https://www.runpod.io/console/user/secrets).
33+
2. Select the name of the Secret you want to modify.
34+
3. Select the configuration icon and choose **Edit Secret Value**.
35+
1. Enter your new Secret Value.
36+
4. Select **Save Changes**.
37+
38+
## View Secret details
39+
40+
You can view the details of an existing Secret using the RunPod Web interface.
41+
You can't view the Secret Value.
42+
43+
1. Login into the RunPod Web interface and select [Secrets](https://www.runpod.io/console/user/secrets).
44+
2. Select the name of the Secret you want to view.
45+
3. Select the configuration icon and choose **View Secret**.
46+
47+
## Use a Secret in a Pod
48+
49+
With your Secrets setup, you can now reference them in your Pods.
50+
51+
You can reference your Secret directly or select it from the Web interface when creating or modifying a Pod template.
52+
53+
**Reference your Secret directly**
54+
55+
You can reference your Secret directly in the [Environment Variables](/pods/references/environment-variables) section of your Pod template.
56+
To reference your Secret, reference it's key appended to the `RUNPOD_SECRET_` prefix.
57+
For example:
58+
59+
```yml
60+
{{ RUNPOD_SECRET_hello_world }}
61+
```
62+
63+
Where `hello_world` is the value of your Secret Name.
64+
65+
**Select your Secret from the Web interface**
66+
67+
Alternatively, you can select your Secret from the Web interface when creating or modifying a Pod template.
68+
69+
## Delete a Secret
70+
71+
You can delete an existing Secret using the RunPod Web interface.
72+
73+
1. Login into the RunPod Web interface and select [Secrets](https://www.runpod.io/console/user/secrets).
74+
2. Select the name of the Secret you want to delete.
75+
3. Select the configuration icon and choose **Delete Secret**.
76+
4. Enter the name of the Secret to confirm deletion.
77+
5. Select **Confirm Delete**.

0 commit comments

Comments
 (0)