More Info:
Storing secrets in an external, dedicated secrets management system reduces the risk of exposure through the Kubernetes API and etcd. Evaluate cloud provider or third-party secret stores.Risk Level
MediumAddress
SecurityCompliance Standards
- CIS AKS
Triage and Remediation
- Remediation
Remediation
Manual Steps
Manual Steps
-
Inventory current Kubernetes Secret usage
- Run on: any machine with kubectl access
- List all Secrets by type to understand what data is stored in-cluster:
- Spot candidates for externalization (e.g.,
Opaque,kubernetes.io/basic-auth,kubernetes.io/dockerconfigjson).
-
Identify workloads dependent on sensitive Secrets
- Run on: any machine with kubectl access
- Find which Pods reference which Secrets (env vars and volume mounts):
- Prioritize Secrets used by internet-facing, privileged, or critical workloads for potential migration to an external store.
-
Review existing external secret store integrations
- Run on: any machine with kubectl access
- Check for common integrations (adapt namespace if needed):
- If such components exist, inspect their configuration/manifests to confirm which Secrets are already backed by an external provider.
-
Evaluate cloud/third‑party options and select a standard
- Out-of-band review (console/IaC)
- For your cloud (e.g., AWS, Azure, GCP, OCI) or third‑party (e.g., Vault), review available services (KMS-integrated secret stores, dedicated secret managers) and Kubernetes integrations (CSI driver, External Secrets Operator, Vault Agent, etc.).
- Decide on:
- A primary external secret system for new workloads.
- An access model (service accounts, IAM roles, workload identity).
- A rollout approach (new apps first vs. migrating existing Secrets).
-
Pilot configuration using manifests / IaC
- Run on: any machine with kubectl access
- Deploy the chosen integration in a non‑production namespace using manifests or existing IaC, then create one test Secret through the external system and expose it to a test Pod. Example (generic pattern, adapt to chosen tool):
- Confirm the Pod can read the secret value at runtime (e.g., via
kubectl execinto the test Pod).
-
Plan and verify migration away from in‑cluster Secrets
- Run on: any machine with kubectl access
- For each high‑priority Kubernetes Secret selected in step 2:
- Create the equivalent secret entry in the external store.
- Update Pod/Deployment manifests (or Helm/IaC) to consume it via the chosen integration instead of a native
Secret.
- Verify you are reducing in‑cluster Secrets over time:
- Track this count and the list from step 1 periodically to confirm that sensitive data is increasingly sourced from the external store rather than native
Secretobjects.
Using kubectl
Using kubectl
- Large numbers of Secrets in a namespace.
- Many Pods consuming the same sensitive-looking Secrets (db-password, api-key, tls-*, jwt-secret, etc.), showing widespread in-cluster secret reliance.
- Generic Opaque secrets holding passwords, API tokens, or database credentials.
- Long-lived, non-rotated credentials (age in
kubectl get secretsis very large). - Application credentials stored as Secrets instead of being sourced from an external manager.
- Many workloads directly depending on Kubernetes Secrets without any reference to an external secret provider.
- Secrets used broadly across multiple deployments, suggesting central, static credentials.
- No
secretproviderclassresource available or none defined in application namespaces. - No other custom resources related to external secret integrations (e.g., ExternalSecret, VaultSecret).
- No CRDs or Pods related to any external secret operator / CSI driver / vault agent.
- All secret handling apparently done via native Kubernetes Secrets only.
env.valueFrom.secretKeyRefandvolumes.secret.secretNamereferencing Kubernetes Secrets.- Absence of environment variables or volumes that would be populated via an external provider (e.g.,
csidriver volumes, vault agent sidecars, external-secrets annotations).
- Critical app credentials (database, payment gateway, upstream APIs) all coming from Kubernetes Secrets.
- No integration pattern (sidecar, CSI, operator) that suggests use of a cloud/third-party secret manager.
Automation
Automation

