# diagrid k8s-operator install

Install or upgrade the Catalyst Kubernetes operator

### Description

Install or upgrade the Catalyst Kubernetes operator on a cluster.

This is the main onboarding path for the Catalyst operator. It creates a
Catalyst service account and API key for the operator to authenticate to the
control plane, then installs (or upgrades) the operator Helm chart with those
credentials wired in.

By default the latest published chart is installed from the public OCI
registry; use --version to pin a release, or pass a local chart directory to
\--helm-chart. Standard Helm value flags (--set, --set-string, --values/-f,
\--reuse-values, ...) are supported and layered underneath the injected
credentials.

The operator's mutating webhook requires cert-manager in the cluster. Install
it first if you have not already:
kubectl apply -f https://github.com/cert-manager/cert-manager/releases/latest/download/cert-manager.yaml

The chart also ships the Dapr CRDs, which a cluster that already runs Dapr
manages itself. A pre-flight check detects that and installs with
\--set dapr.installCRDs=false; pass the flag yourself to pin either behaviour.

```
diagrid k8s-operator install [flags]
```

### Examples

```

  # Install the latest operator into the current kube context
  diagrid k8s-operator install

  # Pin a specific chart version
  diagrid k8s-operator install --version 1.51.0

  # Install from a local chart directory
  diagrid k8s-operator install --helm-chart ./services/k8s-operator-catalyst/helm/catalyst-operator

  # Target a specific cluster and override Helm values
  diagrid k8s-operator install --context my-eks --set replicaCount=2

  # Upgrade in place, reusing the previously supplied values (keeps the existing API key)
  diagrid k8s-operator install --reuse-values --skip-service-account

  # Bring your own API key instead of creating a service account
  diagrid k8s-operator install --api-key "$CATALYST_API_KEY"

  # Force the chart to install the Dapr CRDs even if the cluster already has them
  diagrid k8s-operator install --set dapr.installCRDs=true

```

### Options

```
      --helm-chart string         OCI reference or local directory of the operator Helm chart to install. (default "oci://public.ecr.aws/diagrid/catalyst-operator")
      --version string            Chart version to install (e.g. 1.51.0). Defaults to the latest published version.
  -n, --namespace string          Namespace to install the operator into. (default "catalyst-system")
      --release-name string       Helm release name for the operator. (default "catalyst-operator")
      --kubeconfig string         Path to the kubeconfig file. Defaults to the standard resolution (KUBECONFIG / ~/.kube/config).
      --context string            Name of the kube context to install to. Defaults to your current context.
      --api-key string            Catalyst API key to wire into the operator. When set, no service account is created.
      --service-account string    Name of the Catalyst service account to create/reuse for the operator. (default "catalyst-k8s-operator")
      --api-key-name string       Name prefix for the API key minted for the operator. Use a distinct value per cluster when sharing one service account. (default "diagrid-k8s-operator")
      --skip-service-account      Do not create a service account or inject an API key (rely on existing Helm values / secret).
      --rotate-api-key            Mint a new API key even on upgrade and delete the previously minted ones. Without this, upgrades reuse the existing key.
      --skip-cert-manager-check   Skip the pre-flight check that cert-manager is installed (the operator webhook needs it).
      --create-namespace          Create the target namespace if it does not exist. (default true)
      --wait                      Wait for the operator resources to be ready before returning. Requires cert-manager for the webhook to come up.
      --timeout duration          Time to wait for resources when --wait is set. (default 5m0s)
      --reuse-values              When upgrading, reuse the last release's values and merge in any overrides.
      --reset-values              When upgrading, reset the values to the chart defaults before applying overrides.
      --set stringArray           Set values on the command line (can be repeated): --set key1=val1,key2=val2.
      --set-string stringArray    Set STRING values on the command line (can be repeated).
      --set-json stringArray      Set JSON values on the command line (can be repeated).
      --set-file stringArray      Set values from respective files specified via the command line (can be repeated).
      --set-literal stringArray   Set a literal STRING value on the command line (can be repeated).
  -f, --values stringArray        Specify values in a YAML file or a URL (can be repeated).
  -h, --help                      help for install
```

### SEE ALSO

- [diagrid k8s-operator](./k8s-operator.md)	 - Install and onboard to the Catalyst Kubernetes operator
