0Pricing
Helm Academy · Lesson

Encrypting Values with helm-secrets and SOPS

Storing encrypted secret values safely in Git.

Encrypting Values with helm-secrets and SOPS is a free Helm Academy lesson on CoddyKit — lesson 2 of 4. You can read the complete lesson below for free — then practise it hands-on in the browser with a built-in code editor and a 24/7 AI tutor. It is part of the Helm Academy learning path, one of 4 lessons in the course, and your progress syncs across the web and the CoddyKit app.

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-secrets

Encrypting 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.yaml

Decrypt 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.yaml

The 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.yaml

Commit 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. 🎉

Frequently asked questions

Is the “Encrypting Values with helm-secrets and SOPS” lesson free?

Yes — the full text of “Encrypting Values with helm-secrets and SOPS” is free to read here on the web, and the Helm Academy course includes 4 lessons in total. To practise it interactively (a built-in code editor and a 24/7 AI tutor) and unlock the rest of the Helm Academy course, upgrade to CoddyKit PRO.

What will I learn in “Encrypting Values with helm-secrets and SOPS”?

Storing encrypted secret values safely in Git. You practise Helm Academy 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 Helm Academy?

No prior experience is required. Helm Academy on CoddyKit is structured for beginners through advanced learners; this is — lesson 2 of 4, so you can start here or from the beginning and move at your own pace.

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 Helm Academy lesson?

Yes. Every Helm Academy 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

  1. Why Secrets Do Not Belong in values.yaml
  2. Encrypting Values with helm-secrets and SOPS
  3. Pulling from External Secrets Operators
  4. Templating Kubernetes Secret Resources
← Back to Helm Academy