Learn how to get secrets out of Infisical and into the systems, applications, and environments that need them.
Use Case / Environment | Recommended Method(s) | Consumes Secrets As | Notes |
---|---|---|---|
Local development or scripting | Infisical CLI | Environment variables | Easiest way to inject secrets during local dev or debugging |
Application code fetching at runtime | SDKs, HTTP API | In-memory / API call | Full control in app code; supports dynamic or ephemeral fetching |
VMs, containers, or CI jobs needing preloaded secrets | Infisical Agent | Env vars or files | Good for non-interactive workloads; avoids inline secret fetch |
GitHub Actions | Secrets Action, Secret Syncs | Env vars or files | Use Action for dynamic fetch; use Syncs to preload into GitHub |
GitLab CI, Jenkins, other CI | Infisical CLI, Infisical Agent, Secret Syncs | Env vars or files | Choose based on timing — fetch at runtime vs. pre-populate ahead |
Kubernetes (declarative secrets) | Kubernetes Operator | Kubernetes Secrets | Syncs from Infisical into native Kubernetes Secrets |
Kubernetes (ESO-based workflows) | External Secrets Operator (ESO) | Kubernetes Secrets | Reuses existing ESO setup; Infisical acts as a provider |
Kubernetes (file-based, no K8s secrets) | Kubernetes Agent Injector | Mounted files | Injects secrets via init container into volume at pod startup |
Kubernetes (file-based, with rotation) | Kubernetes CSI Provider | Mounted files | Uses CSI driver to mount secrets as files with automatic rotation |
Image builds (VMs or containers) | Packer Plugin | Env vars or files | Inject secrets at image build time |
Ansible automation | Ansible Collection | Variables | Runtime secret fetching in playbooks using lookup plugin |
Terraform / Pulumi | Terraform Provider, Pulumi | Inputs / ephemeral resources | Use ephemeral for security; avoids storing secrets in state |
Third-party platforms (GitHub, AWS, etc.) | Secret Syncs | Preloaded secrets | Push secrets to platforms that can’t fetch directly from Infisical |
.env
file, you can use infisical run
to inject secrets as environment variables directly into your development process. This provides a cleaner and more secure workflow. You can also use infisical secrets
to perform CRUD operations on secrets from the command line, which works well for debugging, local tooling, and lightweight scripting.
To learn more, refer to the CLI quickstart.
.env
files during workflows. It supports authentication via AWS IAM, OIDC, or Universal Auth using a Machine Identity.