.env to Kubernetes Secret Converter
Convert .env files into Base64-encoded Kubernetes Secret YAML or plain stringData manifests 100% locally in your browser.
Examples:
→
100% Local — Base64 encoding happens in your browserInput · .env
Output · Kubernetes Secretsecret.yaml
Saved you from writing YAML by hand?Buy me a coffee ($3)
Side-by-Side Syntax Cheat Sheet: .env vs. Kubernetes Secret
Quick reference for the most common directives translated by OpsForge.
| Concept | .env | Kubernetes Secret | Notes |
|---|---|---|---|
| Key/Value Pair | DB_PASS=secret123 | data: { DB_PASS: c2VjcmV0MTIz } | Base64-encoded locally in your browser |
| Plaintext Mode | PORT=3000 | stringData: { PORT: "3000" } | Toggle off Base64 for readable GitOps diffs |
| Non-Sensitive Vars | NODE_ENV=production | kind: ConfigMap | Keep non-secrets out of K8s Secrets |
Common Pitfalls & Best Practices
- Base64 is encoding, not encryption—seal secrets with SealedSecrets, SOPS, or External Secrets Operator before pushing to Git.
- Separate non-sensitive flags into a Kubernetes `ConfigMap` for easier auditing.
Frequently Asked Questions
Are my .env configs or secrets uploaded to a server? +
No. OpsForge executes 100% locally in your browser using client-side TypeScript parsers. Zero configuration text, API keys, or environment variables ever leave your device.
How does OpsForge handle .env directives that do not exist in Kubernetes Secret? +
Any flag or directive without a 1:1 equivalent in Kubernetes Secret is flagged in the Migration Notes panel below the editor and preserved as an inline comment in the generated output so nothing is silently dropped.
Can I use this .env to Kubernetes Secret converter offline? +
Yes. Once the page loads, every parser and serializer runs completely offline with zero network requests.