Join our Newsletter — 33% off our NHI Course

How should security teams implement workload identity in a service mesh across Kubernetes and VM environments?

Security teams should use workload identity to separate how identities are issued from how trust is established. In practice, that means assigning cryptographic identity per workload, validating it consistently across clusters and universal environments, and integrating with a trusted identity provider. This approach reduces reliance on shared credentials and supports stronger zero trust controls for distributed applications.

Why This Matters for Security Teams

workload identity is the control point that lets a service mesh trust a workload without depending on static credentials, shared service accounts, or host-bound assumptions. In Kubernetes and VM estates, that matters because the same application may move between clusters, scale up and down, or span legacy and cloud-native environments while still needing a consistent cryptographic identity. NHI Mgmt Group notes that only 5.7% of organisations report full visibility into their service accounts in the Ultimate Guide to NHIs, which is why identity sprawl often outpaces governance.

The practical risk is not just over-privilege, but identity drift. If the mesh trusts a pod differently from a VM, or one cluster differently from another, teams end up patching gaps with certificates, secrets, and exception policies. That creates brittle trust chains and makes incident response slower when a workload is compromised. The SPIFFE workload identity specification is relevant here because it defines a portable identity model for workloads across heterogeneous runtime environments. In practice, many security teams discover trust mismatches only after a deployment spans both Kubernetes and VMs, rather than through intentional identity design.

How It Works in Practice

The implementation pattern is to issue each workload a verifiable identity at runtime, then let the service mesh use that identity for mutual TLS, authorization, and policy enforcement. In Kubernetes, that usually means binding identity to a pod or service account and projecting it into the workload through the mesh control plane or a node-local agent. In VM environments, the same identity model must be anchored to the machine runtime, often through a bootstrap process that proves the VM before issuing a workload certificate.

A consistent design usually includes three parts:

  • A workload identity source of truth, such as a trust domain or identity provider that can mint short-lived identities.
  • A federation layer so Kubernetes clusters and VM estates can share validation rules without sharing long-lived secrets.
  • Policy decisions evaluated at request time, not hard-coded per environment, so the mesh can authorize based on identity, workload attributes, and destination context.

Current guidance suggests aligning this with zero trust principles and NIST control expectations around identifying and authenticating system components, as reflected in NIST SP 800-53 Rev 5 Security and Privacy Controls. Operationally, that means moving away from shared certificates and manually managed secrets, especially because NHIMG reports that 71% of NHIs are not rotated on time in the Ultimate Guide to NHIs. The mesh should validate identity consistently at the sidecar, gateway, or ambient layer, then map that identity to least-privilege service-to-service access.

That approach works best when issuance, rotation, and revocation are automated end to end. These controls tend to break down when VM workloads cannot be reliably attested or when legacy applications cannot consume short-lived credentials without wrapper services.

Common Variations and Edge Cases

Tighter workload identity controls often increase operational overhead, requiring organisations to balance portability against integration complexity. The biggest tradeoff is between a clean cryptographic identity model and the realities of legacy environments that were never built for ephemeral credentials. In those cases, current guidance suggests using adapters, local agents, or translation layers sparingly, because every exception weakens the uniform trust model.

Kubernetes clusters usually benefit from native identity integration, but multi-cluster federation can become messy if each cluster has different trust roots, mesh versions, or policy engines. VM fleets add another layer of variation: some can support strong attestation and short-lived cert issuance, while others may only support coarse-grained machine identity. For that reason, there is no universal standard for this yet across every service mesh and runtime combination. Security teams should treat portability as an architectural requirement, not an afterthought.

NHIMG’s Guide to SPIFFE and SPIRE is useful when deciding whether to standardise on a portable identity layer for both clusters and VMs, while the Critical Gaps in Machine Identity Management report highlights how manual machine identity processes still dominate in many organisations. In practice, teams get into trouble when the mesh is secure inside Kubernetes but the VM side is left on long-lived certificates, because that creates a weakest-link identity boundary.

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, OWASP Agentic AI Top 10 and CSA MAESTRO address the attack and risk surface, while NIST AI RMF and NIST Zero Trust (SP 800-207) set the governance and control requirements practitioners need to meet.

Framework Control / Reference Relevance
OWASP Non-Human Identity Top 10 NHI-01 Workload identity replaces shared machine credentials with verifiable NHI identity.
OWASP Agentic AI Top 10 A-03 Runtime authorization and dynamic trust are core to autonomous or tool-using workloads.
CSA MAESTRO ID-02 MAESTRO addresses identity and trust for distributed AI and service workloads.
NIST AI RMF AI RMF supports governance of dynamic, context-dependent system behavior.
NIST Zero Trust (SP 800-207) PR.AC-1 Zero trust requires strong, continuous identity verification for every workload.

Map each workload to a portable identity and federate trust across runtime environments.