Kubernetes ConfigMap & Secret Generator
Guide
Kubernetes ConfigMap & Secret Generator
Build kubectl-ready Kubernetes ConfigMap and Secret manifests from a simple list of KEY=value pairs. The generator validates resource names against RFC 1123, base64-encodes Secret values for the data field, and emits clean YAML that you can pipe straight into kubectl apply -f -. No data leaves your browser.
How to Use
- Choose the resource type: ConfigMap for non-sensitive configuration or Secret for credentials, tokens, and certificates.
- Enter a lowercase resource name (RFC 1123) and, optionally, a namespace.
- For Secrets, pick the secret type (
Opaque,kubernetes.io/dockerconfigjson,kubernetes.io/tls, etc.) and decide whether to auto base64-encode values (data:) or keep them plain (stringData:). - Paste your key/value pairs, one
KEY=valueper line. Add labels and annotations if you need them. - Copy the generated YAML or download it as a
.yamlfile ready forkubectl apply.
Features
- ConfigMap and Secret in one tool – Toggle between resource types without losing your input.
- Auto base64 encoding – Secret values are encoded with full UTF-8 support, so passwords and tokens with non-ASCII characters round-trip correctly.
- stringData mode – Skip encoding when you want a human-editable manifest; Kubernetes will base64-encode for you on apply.
- All standard Secret types –
Opaque,kubernetes.io/dockerconfigjson,kubernetes.io/tls,kubernetes.io/basic-auth,kubernetes.io/ssh-auth, andkubernetes.io/service-account-token. - Live RFC 1123 validation – Catch invalid names, namespaces, and data keys before
kubectl applyrejects them. - Labels, annotations, and immutable flag – Add metadata and opt into the immutable flag for resources that should never change.
- Smart YAML quoting – Values that look like numbers, booleans, or contain special characters are automatically quoted; multi-line values use block scalars.
- 100% client-side – Keys and values never leave the browser; nothing is uploaded, logged, or transmitted.
FAQ
-
What is the difference between a ConfigMap and a Secret in Kubernetes?
ConfigMaps store non-sensitive configuration as plain key/value pairs, while Secrets are intended for credentials, tokens, and other sensitive material. Secret values are stored base64-encoded and Kubernetes can mount them with stricter permissions, integrate them with encryption-at-rest providers, and limit which nodes receive them.
-
Why are Kubernetes Secret values base64-encoded?
Base64 encoding lets binary data travel safely inside YAML/JSON without breaking structure or producing invalid characters. It is not encryption, so anyone with read access to the cluster API can still decode the values. Real protection comes from RBAC, encryption-at-rest, and audit logging.
-
When should I make a ConfigMap or Secret immutable?
Mark a ConfigMap or Secret immutable when you do not expect to change it and you want to reduce kubelet load on large clusters. Immutable resources skip watch-based refresh, so the kubelet stops issuing periodic GETs. The tradeoff is that you must delete and recreate the resource to change a value.
-
What is the difference between data and stringData in a Secret manifest?
The data field must contain base64-encoded values; the API server stores them as-is. The stringData field accepts plain UTF-8 strings that the API server base64-encodes for you on create or update. If both are present, stringData wins for any overlapping key. Use stringData when authoring secrets by hand and data when integrating with tooling that already encodes.
Install Our Extensions
Add IO tools to your favorite browser for instant access and faster searching
恵 Scoreboard Has Arrived!
Scoreboard is a fun way to keep track of your games, all data is stored in your browser. More features are coming soon!
Must-Try Tools
View All New Arrivals
View AllUpdate: Our latest tool was added on Jun 14, 2026
