Kubernetes and container identities are secured by treating every pod, service account, and node credential as a non-human identity that needs discovery, passwordless authentication, and lateral-movement containment — not by trusting cluster-internal traffic by default. The control that most teams skip is data resilience: persistent volumes and etcd secrets are single points of failure that ransomware operators target once they land inside a cluster.
- Secure Kubernetes and container identities with four layers: exposure discovery, passwordless workload auth, microsegmentation, and data resilience.
- Kubernetes 1.24 (2022) removed auto-generated long-lived service account secrets — legacy clusters still running older versions carry that risk.
- Default RBAC bindings and cluster-wide service accounts are the most common source of container lateral movement in 2026 audits.
- Cyber Storage from Secfolio protects persistent volumes and etcd backups by sharding encrypted data so a compromised cluster yields no reconstructable file.
Why this matters
Containers and Kubernetes control planes generate more non-human identities than any other part of the modern stack — service accounts, workload tokens, sidecar certificates, and CI/CD pipeline credentials all authenticate to the cluster and to each other. Each one is a potential attack path. A compromised pod with a broadly scoped service account token can call the Kubernetes API, read secrets across namespaces, or pivot to cloud IAM roles if the cluster runs on EKS, AKS, or GKE with workload identity federation misconfigured.
Most breach reports point to the same root cause: identity, not the container runtime. The fix is not a new scanner — it's eliminating standing privilege and containing what a compromised identity can reach.
How to secure Kubernetes and container identities
Treat this as four sequential controls, not a checklist to run once a year.
| Layer | Control | What it stops |
|---|---|---|
| 1. Exposure | Non-human identity risk detection in cloud environments | Orphaned service accounts, over-permissioned tokens, exposed API endpoints |
| 2. Identity | Passwordless workload authentication (mTLS, SPIFFE/SPIRE, short-lived tokens) | Credential theft from mounted secrets and long-lived tokens |
| 3. Containment | Identity microsegmentation for hybrid cloud environments | Pod-to-pod and namespace-to-namespace lateral movement |
| 4. Resilience | Data sharding for persistent volumes and etcd backups | Ransomware encryption and exfiltration of cluster data |
Run the layers in order. Discovery tells you what exists; passwordless authentication removes the credentials attackers steal; microsegmentation stops the ones that get compromised anyway; data resilience limits the damage when all three fail.
Layer 1: Find every non-human identity before you fix anything
You cannot secure a service account you don't know exists. Kubernetes clusters accumulate service accounts, ServiceAccount tokens, ConfigMaps holding credentials, and CI/CD deploy keys faster than most security teams inventory them. Start with:
- Every namespace's default service account and whether workloads still auto-mount its token
- Cluster role bindings that grant
cluster-adminor wildcard verbs to a service account - Cloud workload identity federation bindings (IRSA on EKS, Workload Identity on GKE) that map a Kubernetes service account to a cloud IAM role
- CI/CD pipeline secrets stored as Kubernetes Secrets instead of pulled from a vault at runtime
This is exactly the non-human identity risk detection problem — containers just produce non-human identities at a higher rate than VMs ever did.
Layer 2: Replace static credentials with passwordless workload auth
Static service account tokens baked into a container image or mounted with no expiration are the container equivalent of a shared admin password. Kubernetes 1.24, released in 2022, stopped auto-generating long-lived Secret-based tokens for this reason — but clusters upgraded from older versions, or workloads still requesting the legacy TokenRequest path with extended TTLs, keep the exposure alive.
The fix mirrors what Secfolio applies to human identity: eliminate the reusable credential.
- Use bound, short-lived service account tokens (default projected volume tokens expire in one hour and auto-rotate)
- Adopt SPIFFE/SPIRE or a service mesh's mTLS identity for workload-to-workload authentication instead of shared API keys
- Federate cloud IAM access through workload identity instead of embedding cloud credentials in the pod spec
- Pull secrets from a vault at pod startup rather than mounting them as Kubernetes Secrets, which are only base64-encoded, not encrypted, by default
Layer 3: Contain lateral movement between pods and namespaces
A flat cluster network means a compromised pod in one namespace can reach the API server, other namespaces, and any service without a network policy blocking it. This is the same lateral-movement problem Secfolio addresses in traditional networks, applied to the cluster's internal traffic.
Identity microsegmentation for hybrid cloud environments extends this logic to containers: define which identities — not just which IP ranges — can talk to which services, then enforce it at the network policy and service mesh layer. NetworkPolicy objects alone are a start; identity-aware segmentation stops an attacker who has already stolen a valid token from moving beyond the workload it was issued for.
Layer 4: Assume the cluster gets breached — protect the data
Every layer above reduces the odds of compromise. None of them eliminates it. When a container escape or a stolen cloud credential does reach persistent storage — etcd snapshots, backup buckets, or mounted volumes — the traditional failure mode is a single complete copy an attacker can encrypt or exfiltrate whole.
Cyber Storage is Secfolio's answer to that failure mode. It encrypts data before it leaves the environment, shards the encrypted output into fragments, and distributes those fragments across independent locations. No single location — including a compromised persistent volume or backup target — holds a reconstructable file. Ransomware operators find unusable fragments instead of a database dump or config backup they can hold for ransom. Authorized recovery still happens quickly, because Secfolio's distributed recovery reassembles the shards on demand rather than restoring from one intact copy.
“A service account token an attacker cannot steal is worth more than a backup they can still encrypt.”
This doesn't replace network policy or workload identity — it's the layer that matters once the first three get bypassed, which every incident response history says eventually happens.
Why Kubernetes identity risk varies by cluster
- Cluster count and sprawl — organizations running dozens of clusters across dev, staging, and multiple clouds lose visibility into which service accounts still have broad RBAC bindings
- Kubernetes version — clusters below 1.24 may still generate long-lived Secret-based tokens by default
- Cloud workload identity configuration — IRSA and Workload Identity mappings that are too permissive turn a pod compromise into a cloud account compromise
- CI/CD pipeline design — pipelines that inject cloud credentials directly into build pods create a standing identity outside normal cluster RBAC
- Service mesh adoption — clusters without mTLS between services rely on network-layer trust instead of verified identity
- Secrets management maturity — teams using Kubernetes Secrets as the source of truth versus pulling from an external vault at runtime
Are Kubernetes service accounts the same risk as human identities?
Service accounts carry more standing risk than most human accounts because they're rarely reviewed, often over-permissioned by default, and frequently shared across multiple workloads. The non-human identity risk detection approach treats them as first-class identities requiring the same lifecycle discipline as a privileged human account — discovery, least privilege, and rotation.
How do you stop lateral movement between pods and namespaces?
Stop pod-to-pod lateral movement by combining Kubernetes NetworkPolicy enforcement with identity-aware microsegmentation that scopes access by workload identity, not just IP range or namespace label. A stolen service account token then only reaches the specific services it was issued for, not the rest of the cluster.
Do you need a service mesh to secure container identities?
A service mesh is not required, but it's the fastest path to mTLS between workloads and per-service identity verification. Without one, teams have to build equivalent controls through SPIFFE/SPIRE, cloud-native workload identity federation, and strict NetworkPolicy — achievable, but more manual to maintain through 2026 and beyond.
Stop Ransomware Before It Reaches Your Clusters
See how data sharding protects persistent volumes and backups from encryption and exfiltration.
FAQ
What is the best way to secure Kubernetes and container identities in 2026?
Secure Kubernetes and container identities by discovering every service account and workload token, replacing static credentials with passwordless workload authentication, enforcing identity-aware microsegmentation between pods, and protecting persistent data with sharded, distributed storage. Skipping any one layer leaves an attack path open.
Are Kubernetes secrets encrypted by default?
Kubernetes Secrets are base64-encoded, not encrypted, by default and are readable by anyone with API access to that namespace unless encryption at rest is explicitly enabled on the API server. Most teams pull sensitive credentials from an external vault instead of relying on native Secrets.
How does identity microsegmentation apply to containers?
Identity microsegmentation for containers scopes network and API access by workload identity rather than IP address or namespace alone, so a compromised pod cannot reach services outside its authorized scope. It works alongside Kubernetes NetworkPolicy rather than replacing it.
What changed with Kubernetes service account tokens in version 1.24?
Kubernetes 1.24, released in 2022, stopped auto-generating long-lived Secret-based service account tokens, requiring bound, short-lived tokens through the TokenRequest API instead. Clusters upgraded from earlier versions can still carry legacy long-lived tokens if they weren’t manually cleaned up.
Can ransomware target Kubernetes persistent volumes?
Yes — persistent volumes, etcd snapshots, and backup buckets are common ransomware targets once an attacker gains cluster access, because they often hold a single complete copy of application data. Sharded, distributed storage removes that single point of failure by ensuring no one location holds a reconstructable file.
Do cloud workload identity features like IRSA eliminate the need for Kubernetes RBAC?
No — cloud workload identity federation like IRSA on EKS controls what a service account can do in the cloud provider’s IAM, while Kubernetes RBAC still controls what it can do inside the cluster API. Both need least-privilege scoping independently.
Is a service mesh required for zero-trust Kubernetes security?
A service mesh is not strictly required for zero-trust Kubernetes security, but it’s the fastest way to get mTLS between workloads and verified per-service identity. Without a mesh, teams need SPIFFE/SPIRE or equivalent workload identity tooling to reach the same outcome.
One last thing
The control most clusters skip isn't identity discovery or microsegmentation — it's data resilience for the storage layer underneath them. Teams harden RBAC and network policy for months, then run a single unencrypted etcd backup to one S3 bucket that an attacker with cluster-admin access can delete or exfiltrate in minutes. Fix identity first, but assume the storage layer will eventually face an attacker who got past it — that's the assumption sharded, distributed data resilience is built on.
Related guides
- How to build a zero-trust architecture for hybrid cloud
- How to secure privileged accounts in a multi-cloud environment


