# Add a ConfigMap

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

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

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

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

| Field/Option | Overview                                                                                                                              |
| ------------ | ------------------------------------------------------------------------------------------------------------------------------------- |
| Namespace    | Select the namespace where the ConfigMap will be saved.                                                                               |
| Name         | Give the ConfigMap a descriptive name.                                                                                                |
| Annotations  | You can add annotations to your ConfigMap as required by clicking **Add annotation** and filling in the **Key** and **Value** fields. |

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

In the **Data** section you can enter the details of your ConfgMap, 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/ANfiEdNQH6FDdAIOiEOK" alt=""><figcaption><p>Adding data in Simple mode</p></figcaption></figure>

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

When you have finished defining the ConfigMap, click **Create ConfigMap.**


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.portainer.io/user/kubernetes/configurations/add.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
