Use this file to discover all available pages before exploring further.
ale supports connecting not only Kubernetes clusters from major CSPs but also Generic Kubernetes clusters. Depending on how the agent is executed, you can register and manage clusters using the following steps.
Once logs from pm2 appear as shown below, the agent is successfully running. You can find the agent token required for cluster registration in the log message starting with `agent token is...`.
pm2 log ale-agent
...0|ale-agent | [INFO] [runtime:init] using embedded mongodb "mongodb://127.0.0.1:27017/ale" at "/home/ubuntu/.ale/mongodb"0|ale-agent | [INFO] [runtime:init] using cluster: default0|ale-agent | [INFO] [k8s] KubernetesClusterDriver initialized with agent {"connection":{"context":"default","namespace":"ale"},"stat":{"db":{"url":"mongodb://127.0.0.1:27017/","dbName":"ale"}}}0|ale-agent | [INFO] [k8s] ConfigContext initialized with {"connection":{"context":"default","namespace":"ale"},"stat":{"db":{"url":"mongodb://127.0.0.1:27017/","dbName":"ale"}}}0|ale-agent | [INFO] [k8s] connect k8s to "default"0|ale-agent | [INFO] [k8s] [agent] cluster agent initialized0|ale-agent | [INFO] [runtime:agent] Ale Agent is initialized with config0|ale-agent | [INFO] [agent-server] token loaded from secret "ale/agent-secrets"0|ale-agent | [INFO] [runtime:init] agent httpsd is listening at 0.0.0.0:98010|ale-agent | [INFO] [runtime:init] agent token is cat-c5a7cea7b25709a0863ac64a80155d46.930d450e5893040b54820c830|ale-agent | [INFO] [k8s] config loaded from cluster from "ale/agent-config"0|ale-agent | [INFO] [stat] stat controller init {"collector":{"prefix":"ale"},"db":{"url":"mongodb://127.0.0.1:27017/","dbName":"ale"},"connection":{"context":"default","namespace":"ale"}}0|ale-agent | [INFO] [stat] connect k8s to "default"0|ale-agent | [INFO] [stat] stat watcher started
If database conflicts occur during execution or you need to reset the configuration, run the following command to delete existing ale data and restart.
rm -r ~/.ale
4
Click 'Connect' at the bottom of the settings page in the management system, and enter the following details.
Cluster Platform: Generic Kubernetes
Name, Display Name: Name to be displayed on the dashboard
Agent Connection Address
Access Token: Token retrieved from the logs in the previous step
Connected clusters can be selected as the target deployment cluster when creating projects or deployment environments for service deployment in the dashboard.
kubectl get svc \ -n ale \ ale-agent-lb \ -o jsonpath='{.status.loadBalancer.ingress[0].hostname}' \| xargs -I{} echo "https://{}"
2
Retrieve the agent token
kubectl get secrets agent-secrets -n ale -o jsonpath='{.data.AGENT_TOKEN}' | base64 --decode
3
Click 'Connect' at the bottom of the settings page in the management system, and enter the following details.
Cluster Platform: Select the provider of the cluster to connect
Name, Display Name: Name to be displayed on the dashboard
Agent Connection Address
Access Token: Token retrieved from the logs in the previous step
Connected clusters can be selected as the target deployment cluster when creating projects or deployment environments for service deployment in the dashboard.