Secrets and certificates — for the ones you couldn't eliminate
The Mesh Series · Article 19
Secrets & certificatesKubernetesWorkload identityGitOpsNetwork policy

The Mesh Series · Article 19 · Where Entra meets Istio
This series has spent eighteen articles deleting secrets. Passwordless killed the user's password (Article 9). Federation killed the workload's client secret (Article 15). Mesh mTLS killed the shared key between services (Article 14). The recurring line — the fix isn't managing secrets better, it's having fewer to manage — has been doing real work.
But "fewer" isn't "none." Some secrets genuinely must exist: a third-party API key for a payment gateway that only issues static keys, a legacy database password for a system that will never speak OIDC, a signing key you own. And certificates are everywhere by design. So the last question in the identity stack is the honest one: for the secrets you couldn't eliminate, and the certificates you must run, how do you handle them so they don't become the leak?
The answer is a strict order of preference, and most teams skip straight to the bottom of it.

Step one is the whole series so far — and for most of what teams reflexively treat as "a secret to store," the correct move is still don't; federate it away. Only what genuinely survives step one reaches step two. And step two has a rule with no exceptions: the secret never lives in your config. Not in the image, not in an environment variable, not in appsettings, not in a Helm value. It lives in a secret store, and the workload mounts it at runtime — and reaches that store with the federated identity from Article 15, so there's no secret needed to fetch the secret.
Why regulated enterprises should care
The scar this whole series opened on was a secret in config that nobody could safely rotate (Article 8's "the secret is the machine"). Everything above is the disciplined answer to the residue of that problem — the secrets you couldn't delete.
For a regulated institution, key management is not optional hygiene; it's an explicit, tested control. PCI-DSS has a whole requirement family on protecting and rotating cryptographic keys; RBI's IT framework and SAMA's CSF expect documented key lifecycles, controlled access, and evidence of rotation. "We store our API keys in Key Vault, mount them at runtime, rotate them on a schedule, and every access is attributable to a named identity" is a control you can demonstrate. "They're in appsettings, and we rotate them when we remember" is a finding — and the same finding whether the secret is one you chose to keep or one you never thought to eliminate.
The certificate half is the same story with a sharper failure mode: the silent expiry outage. A cert nobody's tracking expires at 2 a.m. and takes a service down, and the fix under pressure is to issue a hasty long-lived one that becomes next year's incident. Automated issuance and renewal — cert-manager watching expiry and rotating ahead of it — is the control that makes "our certificates are always valid and we can prove their lifecycle" true instead of hopeful.
How the pieces come together
Three mechanisms, and the one that ties them to the rest of the series.
Key Vault as the single source of truth. Every residual secret and certificate lives in Key Vault — one place to secure, one place to audit, one place to rotate. Nothing is copied out of it into config.
The CSI driver mounts, it doesn't copy. The Azure Key Vault Provider for Secrets Store CSI Driver projects secrets and certs into the pod as files on a volume at runtime. The application reads a file; it never holds the secret at rest in its own config. And — the tie-in — the driver authenticates to Key Vault using the pod's workload identity (Article 15). There is no secret to reach the secret store; the whole chain is federated. That's the property that makes this consistent with everything before it rather than a step backwards.
cert-manager runs the certificate lifecycle. For application and ingress certificates, cert-manager issues from an issuer you choose (a public CA, an internal CA, Key Vault) and renews automatically before expiry — the same continuous-rotation discipline istiod already applies to the mesh's own workload certs (Article 14), extended to the certs the mesh doesn't manage.
Show the config
Mount a Key Vault secret into the pod as a file — reached with the workload identity, never copied into config:

And a certificate that renews itself — cert-manager watches expiry and rotates ahead of it, no human, no 2 a.m. outage:

The application changes by almost nothing: it reads /mnt/secrets/stripe-api-key as a file instead of Configuration["StripeApiKey"]. That one substitution — a mounted file the workload identity fetched, instead of a string baked into config — is the entire discipline.
Security · Audit · Integration
Security property gained. For the secrets that must exist, there is still nothing in config to leak — they live in Key Vault, are mounted at runtime, and are reached with a federated identity rather than another secret. Certificates never silently expire because renewal is automatic. The residue of the credential-sprawl problem is contained, not ignored.
Audit evidence produced. One source of truth with access logs, secrets mounted rather than copied so there's a single place they exist, automatic rotation with a demonstrable schedule, and every access attributable to a named managed identity. That maps directly onto PCI's key-management requirements and SAMA/RBI key-lifecycle expectations — the control is evidenced, not asserted.
How it integrates. This closes the loop the series opened on: it reuses the workload identity federation (Article 15) to reach the store passwordlessly, extends the automatic-rotation discipline of mesh mTLS (Article 14) and JWKS keys (Article 12) to the certs and secrets they don't cover, and completes the "have fewer secrets, and handle the rest properly" thesis (Article 9).
Alternatives, and when you'd actually pick them
External Secrets Operator. ESO syncs secrets from Key Vault into native Kubernetes Secret objects. Reach for it when an application or controller genuinely needs a real Kubernetes Secret (many off-the-shelf charts do) rather than a mounted file. The trade: the secret now also exists as a K8s Secret, so you inherit the need to secure etcd encryption-at-rest and RBAC around it. Excellent for compatibility; slightly more surface than a pure CSI mount.
Sealed Secrets. Encrypts a secret so the ciphertext can live safely in git, decrypted only in-cluster — the answer when your GitOps discipline says everything must be in the repo. It fits a pure-GitOps world well, but it makes git the system of record for secrets rather than Key Vault, which some regulators and security teams specifically don't want. Choose it when GitOps-purity outranks central-vault control; otherwise prefer the vault.
Raw Kubernetes Secret objects. The default, and the trap. A K8s Secret is base64, not encrypted, and only encrypted at rest in etcd if you explicitly enabled it. Fine as a mounting mechanism behind CSI/ESO; dangerous as your source of truth, because it's one kubectl get secret -o yaml and a base64 decode away from plaintext. Never treat it as the vault.
Secrets in config / image / env. The anti-pattern the entire series exists to end. If a secret is in appsettings, an env var, or baked into an image layer, it's the thing that leaks. There is no scenario where this is the right answer for anything an auditor can reach.
This migration usually doesn't begin with an outage. It begins with infosec flagging the hard-coded keys and secrets already sitting in the open — the connection string in appsettings, the key pasted into a Helm value — and asking the two questions that have no comfortable answer: who can see them, and when were they last rotated. "Everyone who can read the repo" and "never" are the whole business case. That's what pushes the residual secrets behind Key Vault and a CSI mount, and pushes everything that can be federated out of config entirely, so the honest answer to "where is the secret" becomes "there isn't one."
From the toy to the standard
The toy is one mounted Key Vault secret and one self-renewing certificate. The industry-standard version is: every secret that couldn't be eliminated lives only in Key Vault, mounted at runtime and never in config, reached with a federated identity so no secret fetches the secret; every certificate is issued and renewed automatically with a documented lifecycle; native Kubernetes Secret objects are a mounting detail, never a source of truth; and nothing sensitive is ever in an image, an env var, or appsettings. The credential-sprawl problem the series opened on is not just reduced — its residue is contained, rotated, and evidenced.
We've now finished identity, authorization, and secrets — the whole "who, what, and with which keys" of the platform. But every control so far has operated at the identity layer, at L7. Underneath it is the network itself: which pods can even open a socket to which, regardless of identity. Belt-and-suspenders security needs both — the L7 identity policy and the L3/L4 network policy — and knowing which does what.
That's Article 20: network policy and mesh policy.
Next in the series — Article 20: Network policy + mesh policy.
Key skills & topics in this article
Secrets & certificatesKubernetesWorkload identityGitOpsNetwork policy
Also on LinkedIn.