Kubernetes ConfigMap Generator
Generate a Kubernetes ConfigMap in YAML from key=value pairs, ready to apply with kubectl. Centralize your pod configuration in seconds.
YAML
—
Write a ConfigMap without counting spaces
You want three settings out of the code and into a ConfigMap, and then the YAML gets in the way. Two spaces or four? Does data sit under metadata or beside it? One stray space and kubectl answers with mapping values are not allowed in this context. Type the resource name, paste your key=value lines, and the manifest builds itself beside you as you type.
The skeleton is fixed: apiVersion v1, kind ConfigMap, metadata.name, then a data block filled from your lines. Each line splits on the first equals sign, so everything after it stays inside the value, extra equals signs included. Values come out quoted, which keeps DATABASE_URL=postgres://a=b:5432 intact and stops 8080 or true from being read as a number and a boolean.
Two things to check before you apply. The name has to be a DNS-1123 label (lowercase letters, digits, dashes) and keys are limited to letters, digits, dot, dash and underscore; nothing on the page validates that for you. Multi-line values, such as an entire nginx.conf, do not fit here, because every line break becomes another key. Reach for kubectl create configmap --from-file instead. Everything runs in your browser, and editing a ConfigMap never restarts pods on its own.
Frequently asked questions
Can I set a namespace?
Why is every value quoted?
Is there a copy button?
Related Tools
Kubernetes CronJob Generator
Generate a Kubernetes CronJob in YAML with the schedule expression and the container to run. Schedule recurring tasks in your cluster and apply with kubectl.
Kubernetes Secret Generator
Generate a Kubernetes Secret in YAML with values already base64-encoded. Store passwords and tokens safely and apply them to your cluster with kubectl.
Kubernetes Ingress Generator
Generates a Kubernetes Ingress with host, service and port, using the nginx ingressClassName and a root path. The TLS block is yours to add.