> For the complete documentation index, see [llms.txt](https://docs.portainer.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.portainer.io/sts/user/kubernetes/configurations/add-1.md).

# Add a Secret

From the menu select **ConfigMaps & Secrets**, ensure the **Secrets** tab is selected, then click **Add with form**.

{% hint style="info" %}
Secrets can also be added [using a manifest or Helm chart](/sts/user/kubernetes/applications/manifest.md) by clicking **Create from code**.
{% endhint %}

<figure><img src="/files/0wpDEuPG2ECkfppiHaUO" alt=""><figcaption></figcaption></figure>

Define the secret, using the table below as a guide.

| Field/Option | Overview                                                                                                                           |
| ------------ | ---------------------------------------------------------------------------------------------------------------------------------- |
| Namespace    | Select the namespace where the secret will be saved.                                                                               |
| Name         | Give the secret a descriptive name.                                                                                                |
| Annotations  | You can add annotations to your secret as required by clicking **Add annotation** and filling in the **Key** and **Value** fields. |
| Secret Type  | Select from the list of available secret types or select **Custom** to define your own type.                                       |

<figure><img src="/files/H88tpEMa9so1ItgU5zio" alt=""><figcaption></figcaption></figure>

Data fields change to reflect the type of Data to be entered based on the secret type selection above. In the **Data** section you can enter the details of your secret, in either **Simple mode** or **Advanced mode**. Under simple mode you can add entries in a key and value format, and in advanced mode you can paste in multiple values in YAML format.

<figure><img src="/files/KmTAR4QDGt8ZvgWMGYCe" alt=""><figcaption><p>Adding data in Simple mode</p></figcaption></figure>

<figure><img src="/files/Z6J5BZ0qlFkJYA38DyvE" alt=""><figcaption><p>Adding data in Advanced mode</p></figcaption></figure>

When you have finished defining the secret, click **Create Secret.**
