Skip to content

Instantly share code, notes, and snippets.

Encrypting Kubernetes Secrets with Age and SOPS on k3s

SOPS is a handy utility for encrypting sensitive content within files while making it easy to edit and track them with standard developer tools (git, diff, vi, etc.). Using the sops-secret-operator, you can deploy encrypted Kubernetes secrets as SopsSecret custom resources, which are decrypted by the operator and made available as standard Secrets for general consumption. This allows secrets to be tracked securely in version control, deployed with standard CI/CD tools, and edited securely by developers.

Comparison to Alternatives

KSOPS

KSOPS is a Kustomize plugin that supports decrypting SOPS files and applying them to your cluster.

Keybase proof

I hereby claim:

  • I am willbicks on github.
  • I am willbicks (https://keybase.io/willbicks) on keybase.
  • I have a public key whose fingerprint is 9744 6E8C 74EA 58E4 B7AB 2E76 DF48 C653 5E42 CCAE

To claim this, I am signing this object: