docs/snippets/kubernetes-operator-install.mdx
<Tabs>
<Tab title="Cluster-wide (default)">
The operator will watch and manage CRDs across all namespaces in the cluster. This is the default and quickest way to get started.
```bash
helm install --generate-name infisical-helm-charts/secrets-operator
```
</Tab>
<Tab title="Namespace-scoped">
Limit the operator's permissions to only specific namespaces instead of cluster-wide access. Useful for multi-tenant clusters or environments requiring strict resource isolation.
<Note>
For multiple namespace-scoped installations, only the first installation should install CRDs. Subsequent installations should set `installCRDs: false` to avoid conflicts as CRDs are cluster-wide resources.
</Note>
**Single namespace:**
```bash
helm install operator-namespaced infisical-helm-charts/secrets-operator \
--namespace single-namespace \
--set scopedNamespaces=single-namespace \
--set scopedRBAC=true
```
<Accordion title="Using values.yaml file">
```yaml values.yaml
scopedNamespaces: single-namespace
scopedRBAC: true
installCRDs: true
```
</Accordion>
**Multiple namespaces (separate operators):**
```bash
helm install operator-1 infisical-helm-charts/secrets-operator \
--namespace ns1 \
--set scopedNamespaces=ns1 \
--set scopedRBAC=true \
--set installCRDs=true # Only install CRDs once in the cluster (default is true)
helm install operator-namespace2 infisical-helm-charts/secrets-operator \
--namespace ns2 \
--set scopedNamespaces=ns2 \
--set scopedRBAC=true \
--set installCRDs=false # Do not install CRDs in subsequent namespace installations
```
<Accordion title="Using values.yaml file">
```yaml values-operator1.yaml
scopedNamespaces: ns1
scopedRBAC: true
installCRDs: false
```
```yaml values-operator2.yaml
scopedNamespaces: ns2
scopedRBAC: true
installCRDs: false
```
</Accordion>
**Multiple namespaces (single operator):**
```bash
helm install operator infisical-helm-charts/secrets-operator \
--namespace operator-namespace \
--set "scopedNamespaces={ns1,ns2,ns3}" \
--set scopedRBAC=true
```
<Accordion title="Using values.yaml file">
```yaml values.yaml
scopedNamespaces:
- ns1
- ns2
- ns3
scopedRBAC: true
```
</Accordion>
</Tab>
</Tabs>
```bash
kubectl get pods --namespace <namespace>
```
<Note>
If you installed cluster-wide without a `--namespace` flag, the operator is deployed into your current namespace (typically `default`), so run `kubectl get pods` without the flag.
</Note>
By default a service account is created for the operator based on the release name.
You can bring your own service account by setting controllerManager.serviceAccount.create to false and controllerManager.serviceAccount.name to the name of your existing service account.
controllerManager:
serviceAccount:
create: false
name: my-service-account