Join our Newsletter — 33% off our NHI Course

What is the difference between envelope encryption and storing secrets directly in Kubernetes?

Direct secret storage keeps the secret protected only by the cluster’s native handling, while envelope encryption adds a second layer. Kubernetes uses a data encryption key to protect the secret, and that key is itself encrypted with a key encryption key managed externally. This gives organisations stronger separation of duties and better protection of the key material.

How Envelope Encryption Changes the Trust Boundary

Storing a secret directly in Kubernetes means the cluster is responsible for protecting that value end to end, so the secret’s safety depends heavily on cluster access controls, etcd protection, and operational discipline. envelope encryption changes the model by splitting protection between the cluster and an external key hierarchy, which reduces the amount of raw secret material exposed inside the cluster’s own storage path.

That difference matters because the cluster no longer needs to hold the long-term key material in the same place as the protected secret. In practice, the secret is encrypted with a data encryption key, and that key is then wrapped by a separate key encryption key. The result is a narrower blast radius if an attacker or misconfiguration reaches cluster storage.

  • Direct storage is simpler, but it concentrates trust in the Kubernetes control plane and backing storage.
  • Envelope encryption adds an extra cryptographic boundary, which is useful when the organisation wants stronger separation of duties.
  • The protection benefit only exists if the external key management path is actually controlled and monitored.

What Changes Operationally for Kubernetes Secrets

The practical difference is not just “encrypted versus unencrypted”. Kubernetes already treats secrets as sensitive objects, but direct storage keeps the protection model relatively close to the cluster itself. With envelope encryption, the cluster can read and write secrets while the higher-value wrapping key stays outside the immediate datastore path, which is a better fit for environments that need stronger governance over who can unlock secret material.

That also changes how teams should think about compromise. If a user gains broad access to cluster state, direct secret storage makes exposure more immediate. With envelope encryption, the attacker still has to deal with the key protection layer, so a single failure in Kubernetes does not automatically yield plaintext secret values. The trade-off is added complexity in key management and recovery.

For teams comparing patterns, the most important operational question is whether they are protecting against casual exposure, privileged internal access, or full environment compromise. Envelope encryption helps most when the concern is storage exposure and control separation, while direct secret storage depends more on the cluster perimeter and strict administrative hygiene.

When the Difference Becomes Security-Meaningful

The gap between these approaches becomes meaningful when secrets are high value, broadly reused, or tied to privileged systems. In that situation, storing them directly in Kubernetes can make a cluster misconfiguration, backup leak, or admin compromise more damaging than many teams expect. Envelope encryption is not a substitute for rotation or least privilege, but it does reduce the chance that raw secret values are trivially recovered from cluster storage.

For a broader practitioner view, secrets sprawl and overexposure remain a recurring failure pattern in real environments, which is why a defence-in-depth approach is stronger than relying on Kubernetes object protection alone. NHIMG’s Ultimate Guide to NHIs and Guide to the Secret Sprawl Challenge are useful for understanding how exposed secrets become an organisation-wide risk, not just a storage-format issue.

Current guidance from the broader ecosystem also treats this as a key-management problem as much as a storage problem. OWASP Non-Human Identity Top 10 helps frame the risk when secrets are used to represent machine or service access, while NIST SP 800-57 Key Management is the better reference for key lifecycle and wrapping-key governance.

Risk and Threat Considerations

Directly stored Kubernetes secrets are attractive because a single control failure can expose many credentials at once, especially when backups, misconfigured RBAC, or overly broad cluster access are involved. Envelope encryption reduces that exposure, but it also shifts the security burden to the external key system and the availability of the key path.

Failure mechanism: an attacker or insider reaches secret data in etcd, backups, or cluster admin interfaces; with direct storage, plaintext or easily recoverable values are closer to the point of compromise, while envelope encryption forces the attacker to also obtain or misuse the wrapping key path.

Impact: the difference determines whether a cluster compromise becomes immediate credential exposure or a harder multi-step compromise. The residual risk is still serious in both cases, because stolen secret material can be reused outside Kubernetes once it is recovered.

Standards & Framework Alignment

This section maps relevant standards and security frameworks to the operational risks and controls described in this guidance.

OWASP Non-Human Identity Top 10 address the attack and risk surface, while NIST CSF 2.0, NIST Zero Trust (SP 800-207) and CIS Controls v8 set the governance and control requirements practitioners need to meet.

Framework Control / Reference Relevance
OWASP Non-Human Identity Top 10 NHI-01 — Secrets and Credential Management Directly addresses how secrets are stored and protected in non-human access paths.
NHI-03 — Privilege and Access Governance Envelope encryption changes who can unlock secret material and under what authority.
NHI-07 — Lifecycle, Rotation, and Revocation Secret protection depends on rotation, expiry, and recovery discipline after exposure.
Recommendation — Move high-value Kubernetes secrets under stronger lifecycle and wrapping-key controls. Separate cluster access from key-unwrapping authority to reduce blast radius. Rotate Kubernetes secrets and wrapping keys on a defined schedule with tested revocation.
NIST CSF 2.0 PR.AC — Access Control The question is about protecting sensitive values through stronger access boundaries.
PR.DS — Data Security Secret values and encrypted storage are data-protection concerns at rest and in backups.
GV.RM — Risk Management Strategy The choice depends on acceptable exposure, separation of duties, and recovery risk.
Recommendation — Restrict who can read secrets and who can administer the key hierarchy. Encrypt sensitive cluster data at rest and protect backup copies with the same rigor. Set a risk threshold that determines when envelope encryption is mandatory.
NIST Zero Trust (SP 800-207) Section 2 — Zero Trust Architecture Core Principles Secret access should be bounded by explicit trust and reduced implicit access.
Recommendation — Minimise implicit trust between cluster operators and key-management systems.
CIS Controls v8 6 — Access Control Management Controls how access to sensitive data and administrative functions is granted and reviewed.
Recommendation — Limit secret read access and review administrative rights to the key management path.

Practitioner Guidance

What to verify: confirm where the wrapping key lives, who can administer it, and how rotation and recovery are handled. If the key management layer is weaker than the Kubernetes control plane, envelope encryption only moves the problem rather than shrinking it.

Decision rule: use envelope encryption when the secrets are high impact, the environment has meaningful separation-of-duties requirements, or you need to limit what cluster storage and backups can reveal. Direct storage is only defensible when the operational risk is low and the surrounding access model is already very tight.

Practitioner takeaway: the real choice is not convenience versus encryption, but whether secret protection stops at the cluster boundary or continues into an externally governed key hierarchy.