Kubernetes Operator
How to use Infisical to inject, push, and manage secrets within Kubernetes clusters
The Infisical Operator is a collection of Kubernetes controllers that streamline how secrets are managed between Infisical and your Kubernetes cluster. It provides multiple Custom Resource Definitions (CRDs) which enable you to:
- Sync secrets from Infisical into Kubernetes (
InfisicalSecret
). - Push new secrets from Kubernetes to Infisical (
InfisicalPushSecret
). - Manage dynamic secrets and automatically create time-bound leases (
InfisicalDynamicSecret
).
When these CRDs are configured, the Infisical Operator will continuously monitors for changes and performs necessary updates to keep your Kubernetes secrets up to date. It can also automatically reload dependent Deployments resources whenever relevant secrets are updated.
If you are already using the External Secrets operator, you can view the integration documentation for it here.
Install
The operator can be install via Helm. Helm is a package manager for Kubernetes that allows you to define, install, and upgrade Kubernetes applications.
Install the latest Helm repository
The operator can be installed either cluster-wide or restricted to a specific namespace. If you require stronger isolation and stricter access controls, a namespace-scoped installation may make more sense.
Custom Resource Definitions
Currently the operator supports the following CRD’s. We are constantly expanding the functionality of the operator, and this list will be updated as new CRD’s are added.
- InfisicalSecret: Sync secrets from Infisical to a Kubernetes secret.
- InfisicalPushSecret: Push secrets from a Kubernetes secret to Infisical.
- InfisicalDynamicSecret: Sync dynamic secrets and create leases automatically in Kubernetes.
General Configuration
Private/self-signed certificate
To connect to Infisical instances behind a private/self-signed certificate, you can configure the TLS settings in the CRD to point to a CA certificate stored in a Kubernetes secret resource.
Global configuration
To configure global settings that will apply to all instances of InfisicalSecret
, you can define these configurations in a Kubernetes ConfigMap.
For example, you can configure all InfisicalSecret
instances to fetch secrets from a single backend API without specifying the hostAPI
parameter for each instance.
Available global properties
Property | Description | Default value |
---|---|---|
hostAPI | If hostAPI in InfisicalSecret instance is left empty, this value will be used | https://app.infisical.com/api |
Applying global configurations
All global configurations must reside in a Kubernetes ConfigMap named infisical-config
in the namespace infisical-operator-system
.
To apply global configuration to the operator, copy the following yaml into infisical-config.yaml
file.
Then apply this change via kubectl by running the following
Troubleshoot operator
If the operator is unable to fetch secrets from the API, it will not affect the managed Kubernetes secret.
It will continue attempting to reconnect to the API indefinitely.
The InfisicalSecret resource uses the status.conditions
field to report its current state and any errors encountered.
Uninstall Operator
The managed secret created by the operator will not be deleted when the operator is uninstalled.
Install Infisical Helm repository
Was this page helpful?