talira

Sealed Secrets

A Kubernetes controller and tool for one-way encrypted Secrets

open sourceApache-2.0self-hostablefree

Sealed Secrets lets you keep Kubernetes Secrets in Git: the kubeseal CLI encrypts a Secret with the cluster controller's public key into a SealedSecret resource that only that controller can decrypt, not even the person who sealed it. The controller unseals each SealedSecret into an ordinary Secret owned by it, and by default the name and namespace are part of the encrypted data, with namespace-wide and cluster-wide scopes to relax that. Sealing keys renew every 30 days, old keys are kept so existing secrets still decrypt, and kubeseal --re-encrypt moves a file to the newest key. Bitnami, now a Broadcom brand, maintains it under Apache-2.0; the controller installs from a Helm chart or a release manifest.

Ways to install

Problems it solves

  • I can keep all my cluster config in git except the secrets
  • commit encrypted database passwords to a public repo safely so only my cluster can decrypt them
  • let developers encrypt a secret for production without giving them access to read it back
  • GitOps workflow needs secrets in the repo but base64 Kubernetes Secrets aren't encryption
  • encrypt a secret offline with a saved public certificate, without talking to the cluster
  • make sure an encrypted secret can't be renamed or moved into another namespace to steal it
  • rotate the encryption keys for secrets stored in git automatically every month
  • back up and restore the private keys that decrypt my cluster's committed secrets after a rebuild
  • add one new key to an existing encrypted secret file without re-encrypting the whole thing
  • take over existing plain Secrets in the cluster and manage them from encrypted files in git

Features

  • kubeseal CLI encrypts Secrets into SealedSecret resources with the controller's public certificate
  • only the controller in the target cluster can decrypt; no backdoor
  • strict (default), namespace-wide and cluster-wide scopes
  • spec.template sets the generated Secret's type, labels, annotations and immutability, with Sprig functions
  • sealing keys renewed every 30 days by default (--key-renew-period); old keys kept
  • early key renewal with --key-cutoff-time after a suspected compromise
  • kubeseal --re-encrypt, --merge-into, --raw, --validate and offline sealing with --cert
  • recovery of sealed secrets from backed-up keys with --recovery-unseal
  • manage existing Secrets through annotations
  • Helm chart, release manifests (with a no-RBAC variant) and kustomize
View 1 more
  • images signed with cosign

Limitations

  • Doesn't rotate the secrets themselves: renewing the sealing keys leaves existing sealed secrets and the credentials in them unchanged1
  • Can't decrypt sealed secrets without the controller's private key: there's no backdoor, so you back up the keys yourself1

Capabilities

Has a command line toolplan not known

Alternatives

The same job

These do what Sealed Secrets does.

  1. SOPS Simple and flexible tool for managing secrets
  2. git-crypt Transparent file encryption in git
  3. External Secrets Operator Sync secrets from external secret managers into Kubernetes Secrets
  4. Vault Secrets Operator Lets Pods consume Vault secrets natively from Kubernetes Secrets
  5. Kubernetes Secrets Store CSI Driver Integrates secrets stores with Kubernetes via a CSI volume.
  6. dotenvx A secure dotenv, from the creator of dotenv

Compare Sealed Secrets with the top 3