Join our Newsletter — 33% off our NHI Course

Can External Secrets and Kyverno replace static Kubernetes imagePullSecrets?

 

(@nhi-mgmt-group)
Member Moderator
Joined: 2 years ago
Posts: 20842
Topic starter  

TL;DR: Static imagePullSecrets keep private image access alive until someone revokes them, while Cloudsmith's analysis shows that External Secrets and Kyverno can replace them with short-lived OIDC-backed credentials and admission-time image rewriting. The real control shift is from secret persistence to issuance-time governance, because a leaked pull credential should stop being a reusable access path.

Editorial analysis by NHI Mgmt Group, based on content published by Cloudsmith: “Kubernetes image pulls with External Secrets and Kyverno”.

By the numbers:

  • External Secrets replaces the credential every 50 minutes.

Key questions

Q: Why do static image pull secrets increase Kubernetes risk?

A: Static image pull secrets create standing access for registry authentication, so the same credential can be reused across many nodes, namespaces and deployments.

Q: What is the difference between admission control and image scanning?

A: Admission control decides whether a Kubernetes object is allowed into the cluster at create or update time, while image scanning inspects an image for vulnerabilities or policy issues before or after deployment.

Q: How do I rotate Kubernetes image pull credentials safely?

A: Use short-lived tokens tied to workload identity, refresh them on a fixed schedule, and revoke the underlying access path rather than trying to manage a long-lived static secret.

Practitioner guidance

  • Implement short-lived registry credentials Replace static imagePullSecrets with OIDC-backed credentials that expire quickly and are refreshed on a predictable schedule.
  • Enforce admission-time image rewriting Use policy to rewrite upstream image references to a governed registry path before Pods are admitted.
  • Limit who can read cloned pull secrets Apply Kubernetes RBAC so only the controllers and operators that need the generated secret can access it.

Bottom line: Static registry credentials turn Kubernetes image pulls into a standing access problem rather than a short-lived authentication event.

Glossary terms: Kyverno, ServiceAccount JWT, ImagePullSecret, External Secrets Operator

Explore further

View Full Forum →  |  NHI Foundation Course →  |  Our Services →  |  Read the full analysis →



   
Quote
(@mr-nhi)
Member Moderator
Joined: 7 months ago
Posts: 21195
 

Static image pull secrets create hidden machine-identity persistence: the danger is not just leakage, but duration. A registry credential that survives across pods and namespaces behaves like standing privilege for workloads, which means revocation is the real governance event, not initial issuance. In NHI terms, the cluster is operating with a durable credential that should have been treated as ephemeral from the start. Practitioners should model image-pull access as a governed workload identity lifecycle, not as a one-time configuration choice.

A few things that frame the scale:

  • Red Hat’s Kubernetes Security Report found that nearly 9 in 10 organizations had at least 1 container or Kubernetes security incident in the last 12 months.

A question worth separating out:

Q: How should teams govern secrets copied into every namespace?

A: Govern namespace-wide secret distribution by minimising replication, using dedicated service accounts and mounting only the specific secret each workload needs. Copying the same secret into every namespace expands blast radius, complicates revocation and obscures ownership. Prefer central secret management, per-namespace scoping and rotation tied to workload lifecycle.

👉 Read our full editorial: Short-lived OIDC credentials secure Kubernetes image pulls



   
ReplyQuote
Share:

Free weekly newsletter

Subscribe to the NHI & AI Identity Journal

The latest on NHI and Agentic AI security – articles, research, breaches, news and events every week.

Bonus 33% off our NHI Course when you subscribe.