Kubernetes ConfigMap / Secret Builder

Turn KEY=VALUE lines from a .env file into a Kubernetes ConfigMap or Secret manifest. Secrets can use stringData or base64-encoded data, and either kind can be immutable.

Use the tool

Why this tool exists

Moving settings from a .env file into a cluster means writing a manifest key by key and, for Secrets, base64-encoding every value. Doing that by hand is tedious, and a stray newline in the encoded value is a classic cause of broken passwords.

Paste your KEY=VALUE lines, choose ConfigMap or Secret, and set the name and namespace. For a Secret you can use stringData, which Kubernetes encodes for you and keeps readable in the file, or data with base64 values. Keys are checked against the characters Kubernetes allows. Remember that base64 is encoding, not encryption: anyone who can read the Secret can decode it, and a manifest with real values should never be committed. Everything stays in your browser.

How to use it

  1. Paste KEY=VALUE lines, one per line.
  2. Choose ConfigMap or Secret, then enter the name and optional namespace.
  3. For a Secret, pick stringData or base64 data, and tick immutable if needed.
  4. Copy the manifest and apply it with kubectl, without committing real secrets.

Frequently asked questions

Is base64 in a Secret secure?

No. Base64 is only an encoding and is trivial to reverse. Protect Secrets with RBAC, encryption at rest and a secrets manager, and do not commit manifests containing real values.

Should I use stringData or data?

stringData lets you write plain values and Kubernetes encodes them on creation, which is easier to read. data requires base64 values, which suits tools that expect that form.

What keys are allowed?

Letters, digits, hyphens, underscores and dots. A key with other characters gives an error, because Kubernetes would reject it.

What does immutable do?

It sets immutable: true, so the object cannot be changed after creation. This protects against accidental edits and reduces load, but you must create a new object to change a value.