There are many options for installing Argo CD to your cluster, but for the purposes of this guide we'll install it using Helm. If you want to install it in a different way, see the official Argo CD documentation .
If you've already installed Argo CD on your workload cluster, you'll need to patch the argocd-cm
ConfigMap with the values shown in this section.
Before installing the Argo CD Helm chart to your workload cluster, it is recommended you configure it to better suit your needs. Reference for the values can be found here .
In addition to configuring it for your environment, you should add the following patch to the values:
This tells Argo CD to only manage the resources specified and ignore all others in the Autopilot management cluster, and is needed as you'll be adding the Autopilot as an external cluster where you don't have complete access to all resources.
It is safe to deploy it now and configure it later, so you can proceed with the installation:
Run the installation commands for your environment:
You can test if the installation was successful with the argocd version
command.
Create a port-forwarding to be able to connect to the API server without exposing the service:
And connect using the CLI:
Replace <your-company>
with your company name and <./path-to/autopilot/kubeconfig>
to the path where you stored the kubeconfig to the Autopilot management cluster, and run:
You might need to authenticate after running this command. In this case, re-run the command if it times out after authentication.
Now Argo CD is now fully configured to work with Syself Autopilot!
If you want to manage the added cluster declaratively, you can get the resulting manifest created by the Argo CD CLI with this command:
The rest of this guide will cover an example setup, but you can operate it in the same way you would any other Argo CD installation, in accordance with your preferred practices.
To use your new Argo CD setup, the first thing you need to do is add a repository. You can do this either through the user interface or through the CLI. For example, we'll use the CLI to add a private repository hosted on GitHub and authenticate with an access token:
Another option is to add it declaratively, by applying a secret to your cluster:
You can see all the options for adding a repository in the Argo CD documentation .
With a repository added, you can tell Argo CD to deploy all manifests saved in it to a cluster, by using an Application. This is the content of our example repository, all under the resources/
directory:
Now we are ready to create an Application to deploy these resources:
This command created an Application called gitops-example
, with the manifests fetched from the resources/
directory in the https://github.com/your-company/gitops-repo.git
repository to be deployed in the org-<your-company>
namespace of the Autopilot management cluster.
You can also create the Application declaratively:
You can see the state of the Application in the Argo CD web UI. If you click in the cluster resource and go to the DIFF
tab, you'll be able to see some default variables that were set by Autopilot. You should copy these and add to your cluster manifest to avoid Argo CD forcing reconciliation of your cluster.
Once the initial configuration is complete, we recommend that you familiarize yourself with the Argo CD documentation and make any necessary adjustments to your setup. Additionally, we suggest that you change the initial admin user password.
Here is a short list of things you can do: