Prompt
I need a secrets manager that works with Kubernetes, Terraform, and GitHub Actions. What should I look for?
Latest observation
When you’re choosing a secrets manager for Kubernetes, Terraform, and GitHub Actions, the key is not just “can it store secrets?” but how well it integrates into each workflow without spreading credentials around.
What to look for
1. Native auth integrations
You want the secrets manager to support machine-to-machine authentication without static long-lived credentials.
Look for:
- Kubernetes auth
- Workload identity / service account-based auth
- Easy injection into pods
- Support for sidecars, CSI drivers, or external secrets operators
- Terraform auth
- Support for using short-lived tokens or OIDC
- Provider support or a clean API for data sources
- Ability to avoid hardcoding secrets in state files
- GitHub Actions auth
- OIDC federation from GitHub to the secrets manager
- No need to store cloud keys in GitHub secrets
- Fine-grained repo/environment permissions
2. Short-lived, dynamic secrets
Prefer a system that can issue:
- Leased credentials
- Automatic rotation
- Revocation on expiry
This is especially useful for:
- Database passwords
- Cloud IAM credentials
- API tokens for CI/CD
3. Strong access control
You should be able to define:
- Per-app / per-environment policies
- Path-based permissions
- Least privilege access
- Audit logs for every secret read/change
4. Kubernetes-friendly delivery options
Check whether it supports one or more of:
- External Secrets Operator
- Secrets Store CSI Driver
- Native Kubernetes secret sync
- Sidecar/init container patterns
Also consider:
- Whether secrets can be mounted as files vs injected as env vars
- How easy it is to refresh rotated secrets without restarting workloads
5. Terraform compatibility
Terraform has some unique concerns:
- Secrets can end up in state files
- Providers may log sensitive values
- Modules may accidentally expose secrets
Look for:
- A Terraform provider
- OIDC-based auth for Terraform runs
- Ability to fetch secrets at runtime, not embed them in config
- Guidance on keeping sensitive values out of state
- Support for ephemeral credentials in CI
6. GitHub Actions support
For GitHub Actions, the best pattern is:
- OIDC trust from GitHub
- Exchange the OIDC token for a short-lived secret-manager token
- Retrieve only the secrets needed for that job
Look for:
- Official GitHub Actions integration or examples
- Fine-grained claims-based trust policies
- Token TTL controls
- Easy masking/log redaction support
7. Encryption and key management
Make sure it supports:
- Encryption at rest
- TLS in transit
- Optional customer-managed keys or integration with KMS/HSM
- Rotation of master keys
- FIPS/compliance needs if relevant
8. Auditing and compliance
Important features:
- Audit logs for reads, writes, deletes
- Integration with SIEM tools
- Immutable logs if needed
- Alerts for unusual access patterns
9. Secret lifecycle management
You’ll want:
- Versioning
- Expiration/lease policies
- Rotation workflows
- Secret discovery/detection
- Safe deletion and recovery options
10. Operational model
Decide whether you want:
- Managed SaaS
- Self-hosted
- Hybrid
Questions to ask:
- Can it run in your cloud/VPC?
- How much operational overhead does it add?
- What’s the HA/DR story?
- Can it scale to your workload?
Good architecture patterns to prefer
A strong setup often looks like this:
- GitHub Actions uses OIDC to get short-lived access
- Terraform uses the same OIDC federation
- Kubernetes workloads authenticate via service account / workload identity
- Secrets are delivered through CSI driver or External Secrets Operator
- No static credentials are stored in GitHub, Terraform variables, or container images
Red flags
Avoid solutions that rely heavily on:
- Long-lived static API keys everywhere
- Copying secrets into GitHub repo secrets manually
- Storing plaintext secrets in Terraform state
- Manual rotation processes
- Weak auditability
- No Kubernetes-native integration
Common choices to compare
Depending on your environment, you may end up comparing:
- HashiCorp Vault
- AWS Secrets Manager
- Azure Key Vault
- Google Secret Manager
- Doppler
- 1Password Secrets Automation
- Infisical
- Akeyless
Quick recommendation criteria
If you want the best fit, prioritize:
- OIDC support for GitHub Actions and Terraform
- Kubernetes integration via External Secrets or CSI
- Dynamic/short-lived secrets
- Strong audit logs and least-privilege policies
- Minimal secret exposure in Terraform state
If you want, I can also give you:
- a comparison table of the most common secret managers,
- a recommended architecture for your stack,
- or a decision matrix based on self-hosted vs managed.