> For the complete documentation index, see [llms.txt](https://docs.garden.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.garden.io/bonsai-0.13/k8s-plugins/actions/deploy/configmap.md).

# ConfigMap

Very similarly to the [PeristentVolumeClaim action type](/bonsai-0.13/k8s-plugins/actions/deploy/persistentvolumeclaim.md), you can also mount Kubernetes ConfigMaps on `container` deploy actions using the `configmap` action type. ([see here for the full reference](/bonsai-0.13/reference/action-types/deploy/configmap.md)).

Example:

```yaml
kind: Deploy
type: configmap
name: my-configmap
spec:
  data:
    config.properties: |
      some: data
      or: something
...
---

kind: Deploy
name: my-app
type: container
spec:
  volumes:
    - name: configuration
      containerPath: /config

      # The reference to the configmap Deploy
      action: deploy.my-configmap
...
```

This mounts all the keys in the `data` field on the `my-configmap` action under the `/config` directory in the container. In this case, you'll find the file `/config/config.properties` there, with the value above (`some: data ...`) as the file contents.

You can do the same for tests and tasks using the relative [test `spec.volumes`](/bonsai-0.13/reference/action-types/test/container.md#specvolumes) and [task `spec.volumes`](/bonsai-0.13/reference/action-types/run/container.md#specvolumes) fields. `configmap` volumes can of course also be referenced in `kubernetes` and `helm` actions, since they are deployed as standard ConfigMap resources.

Take a look at the [action reference](/bonsai-0.13/reference/action-types.md) for more details.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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.garden.io/bonsai-0.13/k8s-plugins/actions/deploy/configmap.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.
