|
| 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