# Install and verify multi-cluster scaling

Install Kedify on one management cluster and connect the clusters that run your workloads. Check [network access to each member API](https://docs.kedify.io/installation/networking/#multi-cluster) before installing. In the examples, the management installation namespace is `keda`.

## 1. Choose a scaling mode

| Mode | Where you define scaling |
| --- | --- |
| **Distributed scaling** | Create DistributedScaledObjects or DistributedScaledJobs in the management cluster. Kedify distributes the replica or job count across members. |
| **Dedicated KEDA / KPA** | Create ordinary ScaledObjects or ScaledJobs in each member. The management cluster’s KEDA and KPA scale each member’s workloads independently. |

Dedicated mode uses a single management KEDA and KPA installation with cluster-wide watches. To combine [multi-tenant KEDA](https://docs.kedify.io/how-to/multitenant-scaling/) with multi-cluster scaling, choose Distributed scaling.

## 2. Install the management cluster

### Dashboard

1. Open [Install Kedify](https://docs.kedify.io/installation/) for the management cluster. Select the installation method and choose a mode under **Multi-cluster**.

2. Under **Multi-cluster settings**, enable **Discover shared-node vClusters** if you use them. Turn on **Include the management cluster as a member** if it also runs workloads you want to scale.

3. Apply the generated output using [Helm](https://docs.kedify.io/installation/helm/), [Argo CD](https://docs.kedify.io/installation/argo-cd/), or [Flux](https://docs.kedify.io/installation/flux/). Wait for the Agent and KEDA to be ready. For dedicated mode, also check KPA.

### Helm or GitOps values

Merge these settings into the management Agent release’s values and apply them with your existing workflow. For a new release, start with the [Agent installation guide](https://docs.kedify.io/installation/helm/).

For distributed scaling with bundled Kedify KEDA:

```yaml
global:
  features:
    multicluster:
      enabled: true
      type: distributed
keda:
  enabled: true
```

If you manage KEDA as a separate release, keep `keda.enabled: false` in the Agent values and add this entry to the KEDA chart’s `env` list:

```yaml
env:
  - name: RAW_METRICS_GRPC_PROTOCOL
    value: enabled
```

For dedicated scaling with shared-node vClusters:

```yaml
global:
  features:
    multicluster:
      enabled: true
      type: dedicated
      vClusterDiscoveryEnabled: true
keda:
  enabled: true
kpa:
  enabled: true
```

For distributed scaling with shared-node vClusters, also enable `global.features.multicluster.vClusterDiscoveryEnabled`. To include the management cluster as a member, set `agent.multicluster.localCluster.enabled: true`. See the [Helm values reference](https://docs.kedify.io/reference/helm-values/#agent-feature-and-collection-options) for the related settings.

For a fresh Helm installation, save the settings for your mode as `multi-cluster-values.yaml`. [Add the Kedify repository and load Agent credentials](https://docs.kedify.io/installation/helm/#prepare-installation). Read the version from `helm show chart kedifykeda/kedify-agent` and set `AGENT_CHART_VERSION`.

```bash
helm upgrade --install kedify-agent kedifykeda/kedify-agent \
  --namespace keda --create-namespace --wait \
  --version "${AGENT_CHART_VERSION:?Set AGENT_CHART_VERSION first}" \
  -f multi-cluster-values.yaml \
  --set-string agent.orgId="${KEDIFY_ORG_ID:?Set KEDIFY_ORG_ID first}" \
  --set-string agent.apiKey="${KEDIFY_API_KEY:?Set KEDIFY_API_KEY first}"
```

## 3. Register members

- **Distributed Kubernetes members.** Follow [Register member clusters](https://docs.kedify.io/how-to/multicluster-gitops/) to apply RBAC in each member and supply its kubeconfig to the management cluster. Dashboard **Member access Secrets** are templates. Add the kubeconfig before applying each Secret.

- **Shared-node vClusters.** Follow the [distributed](https://docs.kedify.io/how-to/vcluster-scaling/) or [dedicated](https://docs.kedify.io/how-to/vcluster-dedicated-scaling/) walkthrough. For dedicated mode, native discovery prepares the member CRDs and creates its ClusterRegistration.

## 4. Verify member registration and scaling

Open **Multi-Cluster** on the management cluster in the Dashboard and check that your members are connected. For distributed mode, [verify the discovered members](https://docs.kedify.io/how-to/multicluster-gitops/#4-verify), then try [scaling a distributed workload](https://docs.kedify.io/how-to/multicluster-dso/). For dedicated vClusters, [verify the ClusterRegistrations](https://docs.kedify.io/how-to/vcluster-dedicated-scaling/#3-verify-automatic-registration), then create a ScaledObject in a member and check that only its workload changes.

If a member stays disconnected, check its API reachability and credentials from the management cluster. See [multi-cluster diagnostics](https://docs.kedify.io/troubleshooting/platform-scaling/) for the status and events to inspect.

---
Canonical: https://docs.kedify.io/how-to/multicluster-installation/
Source: src/content/docs/how-to/multicluster-installation.md
Documentation index: https://docs.kedify.io/llms.txt
