Connecting External Clusters
The Platform9 ArgoCD can connect and deploy applications to any Kubernetes clusters, not just those created using Platform9 Managed Kubernetes (PMK).
To connect a Kubernetes cluster that is not managed by Platform9, you must download and install the ArgoCD CLI and then use the cluster add
command to connect the cluster with ArgoCD.
Install ArgoCD CLI
To install the ArgoCD CLI, follow the instructions located here: https://argo-cd.readthedocs.io/en/latest/cli_installation/. Once the CLI is installed, configure the CLI to connect to the Platform9 ArgoCD instance by running the following command:
argocd login <<platform9-instance>> --sso --grpc-web-root-path argocd
The CLI is now configured, and you are ready to add your external cluster to the Platform9 ArgoCD instance.
Connecting an External Cluster
ArgoCD connects to a Kubernetes cluster by reading the cluster and user specific details from your local .kubeconfig file. To successfully connect an external cluster, ensure that the kubeconfig file in your/home/.kube
directory contains the cluster you are attempting to add and the context you wish to use.
Next, run the following command to connect your cluster.
argocd cluster add <<kube_config_context>> --name <<(optional) cluster_name>> --server argocd-ui.platform9.horse --grpc-web-root-path argocd
To learn more about this command, review the Cluster Commands page. Once the cluster is connected, you can view its status by running argocd cluster list.
arlon % argocd cluster list
SERVER NAME VERSION STATUS MESSAGE PROJECT
https://f89dd.sq1.us-west-2.eks.amazonaws.com eks2 1.21+ Successful Successful
The cluster will also be visible in the ArgoCD web application under the Settings ⇾ Clusters menu option in the PMK dashboard. That's it. You are now ready to deploy applications on your external cluster using Plaform9 ArgoCD.