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.
YAML
—
Kubernetes Secrets with the base64 already done
A Secret looks like a ConfigMap until you reach the data field, which only takes base64. So you open a terminal, run echo senha | base64, forget the -n flag, and ship a value with a trailing newline that looks right and fails at login. Here you type key=value pairs and the encoded manifest appears as you go, with no stray newline attached to anything.
The output is a fixed block: apiVersion v1, kind Secret, metadata.name, type Opaque, then data with one encoded entry per line, split on the first equals sign. Encoding runs through the browser btoa function, which walks the string byte by byte in Latin-1. An accented password ends up as different bytes than the UTF-8 the cluster expects, and anything past Latin-1, an emoji for instance, makes the whole output read Erro.
Keep it to ASCII values: usernames, tokens, API keys. For accented or non-Latin passwords, encode in a terminal with base64, or skip encoding altogether with stringData, which the API server encodes for you. And the part people skip: base64 is transport, not encryption, so whoever reads the file reads the password in one command. Do not commit the manifest. Generation happens locally in your browser.
Frequently asked questions
Does base64 protect the value?
How do I verify what I generated?
Can it produce a TLS or registry Secret?
Related Tools
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.
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 ConfigMap Generator
Generate a Kubernetes ConfigMap in YAML from key=value pairs, ready to apply with kubectl. Centralize your pod configuration in seconds.