Skip to content
masterclass Buddy

Kubernetes · Resource

ConfigMap

A ConfigMap stores non-confidential configuration as key-value pairs. Pods can use it as environment variables, command arguments, files in a volume, or data read through the Kubernetes API.

Last updated

Since
v1.19

Syntax

apiVersion: v1
kind: ConfigMap
metadata:
  name: <name>
data:
  <key>: <value>
# Optional:
# binaryData:
# immutable: true

In-depth API docs are only for subscribers: parameters, examples, common mistakes and interview practice.

Subscribe
  • Secret
  • Configure a Pod to Use a ConfigMap
  • Volumes
  • environment variables
  • configMapKeyRef
  • configMapRef
  • ConfigMapList

Source: ConfigMaps | Kubernetes. Checked 2026-11-03.