Lion Cipher Lab

Encrypt Kubernetes Secrets at rest, part 1: prove the leak and close it

Why it matters

A Kubernetes Secret looks protected because its values are base64 blobs, but base64 is a reversible encoding, and by default the API server stores those values UNENCRYPTED in etcd — the key-value datastore that is the cluster's source of truth. That means anyone who can read etcd (a compromised control-plane node, a stolen etcd snapshot, an unencrypted backup tape, a misconfigured etcd port) reads every password, token and TLS key in the whole cluster with no cryptography to stop them. Encryption at rest is the control that turns those raw etcd bytes into ciphertext, and it is an explicit…

What you'll learn

Steps in this lab

  1. The problem, in one breath: your Secrets sit in etcd as cleartext
  2. Build a throwaway cluster with kind
  3. Create a Secret — and prove it is only base64
  4. Read the Secret straight out of etcd — watch the cleartext fall out
  5. Write an EncryptionConfiguration (aescbc/secretbox + identity last)
  6. Wire it into the apiserver by recreating the kind cluster
  7. Re-encrypt existing secrets, then verify in etcd
  8. The judgment: static key vs KMS, and where this sits among the other fixes

Open the full interactive lab →