> ## Documentation Index
> Fetch the complete documentation index at: https://docs.ale.run/llms.txt
> Use this file to discover all available pages before exploring further.

# Installation of ale

> A guide to installing and setting up ale on an AWS EKS cluster.

***

## Install ale Components

> Use the following `kubectl` command to install `ale`.

```bash theme={null}
kubectl apply -f https://raw.githubusercontent.com/ale-run/ale/refs/heads/main/k8s/dist/latest/ale.yaml
```

<Info>
  You can verify the completion of the deployment using the following command. If all STATUS fields show `Running`, the installation is complete.

  ```bash theme={null}
  kubectl get pod -n ale
  ```

  ```bash theme={null}
  NAME                             READY   STATUS    RESTARTS   AGE
  ale-agent-77dbd775c8-rtqzc       1/1     Running   0          165m
  ale-controller-bf5c46899-8lrgt   1/1     Running   0          57m
  mongodb-0                        1/1     Running   0          165m
  ```
</Info>

<Note>
  Depending on the cluster conditions, the installation may take some time.
  If the STATUS does not change to `Running` after a long period or if the pod fails to start, use the command `kubectl describe pod <pod name> -n ale` to identify the specific cause.
</Note>

## Database Configuration (Optional)

> By default, ale uses `mongodb` deployed as a StatefulSet in the cluster. If you want to use another database, execute the following commands:

* For MongoDB Atlas:

  ```bash theme={null}
  export DB_USERNAME=[DB username]
  export DB_PASSWORD=$(echo '[DB password]' | jq -Rr @uri)
  export DB_NAME=[DB name]

  kubectl patch secret ale-secrets -n ale \
    -p '{"data": {"DB_URL": "'$(echo -n "mongodb+srv://${DB_USERNAME}:${DB_PASSWORD}@cluster0.nbyq0.mongodb.net/${DB_NAME}?retryWrites=true&w=majority&appName=Cluster0" | base64)'"}}'
  kubectl rollout restart deployment ale-controller -n ale
  ```
