Encrypting Values with helm-secrets and SOPS
Storing encrypted secret values safely in Git.
Encrypting Values with helm-secrets and SOPS is a free DevOps Bootcamp lesson on CoddyKit. This is lesson 2 of 4. Any 3 lessons of this learning path are free to read in full — after that, CoddyKit PRO unlocks every lesson, plus hands-on practice with a built-in code editor and a 24/7 AI tutor. It is part of the DevOps Bootcamp learning path, and your progress syncs across the web and the CoddyKit app. The DevOps Bootcamp course includes 4 lessons in total.
Encrypt, Then Commit
What if you could safely keep secret values in Git? Encryption makes that possible: the file is unreadable without the right key. 🔐
Meet SOPS
SOPS is a tool that encrypts the values inside a YAML file while leaving the keys readable, so diffs still make sense.
Only Values Are Encrypted
A key strength of SOPS is that it encrypts only the values. You can still see which keys exist, just not their secret contents.
db:
password: ENC[AES256_GCM,data:9fK2...,type:str]Backed by a Key Service
SOPS encrypts using a master key from a provider like age, AWS KMS, or GCP KMS, so only authorized holders can decrypt.
The helm-secrets Plugin
The helm-secrets plugin bridges SOPS and Helm, letting Helm decrypt your encrypted values file on the fly during a command.
helm plugin install https://github.com/jkroepke/helm-secretsEncrypting a File
You wrap a values file with the plugin to encrypt it in place, turning plaintext secrets into safe ciphertext ready for Git.
helm secrets encrypt secrets.yaml > secrets.enc.yamlDecrypt at Deploy Time
At install or upgrade, helm-secrets decrypts the file just for that run, feeding plaintext to Helm in memory only.
helm secrets install myapp ./chart -f secrets.enc.yamlThe secrets Command Prefix
You simply prefix normal Helm commands with secrets. The plugin handles decryption, then passes everything through to Helm.
helm secrets upgrade myapp ./chart -f secrets.enc.yamlCommit Ciphertext Only
You commit the encrypted file and keep the plaintext out of Git entirely. The repo holds nothing useful to an attacker.
Rotate by Re-encrypting
To change who can read a secret, you rotate keys and re-encrypt the file. SOPS supports multiple recipients for shared access.
Keys Live Outside Git
The whole model relies on the decryption key staying out of the repo, held by people or a KMS, never beside the ciphertext.
Quick Check
What does SOPS encrypt in a YAML file?
Recap
You learned how helm-secrets plus SOPS encrypts values for safe Git storage and decrypts them only at deploy time. 🎉
Learn DevOps Bootcamp with an AI tutor — free
Write and run real code in your browser, get instant help from a 24/7 AI tutor, and pick up where you left off on the web or in the app.
- Courses
- 142
- Lessons
- 568
Frequently Asked Questions
Is the “Encrypting Values with helm-secrets and SOPS” lesson free?
Yes — any 3 lessons of the DevOps Bootcamp learning path, including “Encrypting Values with helm-secrets and SOPS”, are free to read in full here on the web. After that, CoddyKit PRO unlocks every lesson, plus interactive practice with a built-in code editor and a 24/7 AI tutor. The DevOps Bootcamp course includes 4 lessons in total.
What will I learn in “Encrypting Values with helm-secrets and SOPS”?
Storing encrypted secret values safely in Git. You practise DevOps Bootcamp with hands-on code you run directly in the browser, and a 24/7 AI tutor answers your questions as you work through the lesson.
Do I need any experience to start DevOps Bootcamp?
No prior experience is required. DevOps Bootcamp on CoddyKit is structured for beginners through advanced learners, so you can start here or from the beginning and move at your own pace. This is lesson 2 of 4.
How long does the “Encrypting Values with helm-secrets and SOPS” lesson take?
Most CoddyKit lessons take about 5–10 minutes. Each one is bite-sized and interactive, so you make steady progress and pick up exactly where you left off across the web and the app.
Can I write and run code in this DevOps Bootcamp lesson?
Yes. Every DevOps Bootcamp lesson includes a built-in code editor, so you write and run real code right in your browser and get instant AI feedback — no local setup required.
All lessons in this course
- Why Secrets Do Not Belong in values.yaml
- Encrypting Values with helm-secrets and SOPS
- Pulling from External Secrets Operators
- Templating Kubernetes Secret Resources