# Install Kloudfuse with Multiple Zone Availability

The Kloudfuse platform supports pods deployment across multiple availability zones (multi-AZ) to ensure high availability and fault tolerance. Each zone must have at least one pod to run the supported components.

Current support for multi-AZ is limited to:

- Ingress-NGINX
- Redis (primary/secondary architecture)
- Ingester

This configuration helps maintain service continuity in the event of a zone-level failure, by distributing workloads across multiple zones.

Specify these values in your `custom-values.yaml` file:

## Configuration for Multi-AZ Cluster Setup

```yaml
ingester:
  replicaCount: 1 (1)
  service:
    annotations:
      service.kubernetes.io/topology-mode: Auto

ingress-nginx:
  controller:
    service:
      annotations:
        service.kubernetes.io/topology-mode: Auto
    replicaCount: 3 (1)
    updateStrategy:
      rollingUpdate:
        maxUnavailable: 1
      type: RollingUpdate
    affinity: (2)
      podAntiAffinity:
        requiredDuringSchedulingIgnoredDuringExecution:
        - labelSelector:
            matchLabels:
              app.kubernetes.io/name: ingress-nginx
              app.kubernetes.io/component: controller
              app.kubernetes.io/instance: kfuse-pipeline (3)
          topologyKey: "kubernetes.io/zone"

redis:
  replica: (4)
    replicaCount: 1 (1)
    updateStrategy:
      rollingUpdate:
        maxUnavailable: 1
      type: RollingUpdate
    affinity:
      podAntiAffinity:
        requiredDuringSchedulingIgnoredDuringExecution:
        - labelSelector:
            matchLabels:
              app.kubernetes.io/name: kfuse-redis
              app.kubernetes.io/component: replica
              app.kubernetes.io/instance: kfuse-pipeline (3)
          topologyKey: "kubernetes.io/zone"
  sentinel:
    service:
      annotations:
        service.kubernetes.io/topology-mode: Auto
```

|     |     |
| --- | --- |
| **1** | For multi-AZ cluster setup, replica counts must be `k * (number of different zones in the cluster)`, where `k= 1,2,3…​`. |
| **2** | Must allow restarts with strict `podAntiAffinity`; one pod can be destroyed so a new one can be created on the same node. |
| **3** | Must be the same as the release name. |
| **4** | `replicaCount`: Specify the number of PostgreSQL replicas to deploy.
