In this chapter, you will learn to:
- Use
Helm
to provisionArgo CD
to yourDOKS
cluster. - Keep your
Kubernetes
cluster applications state synchronized with aGit
repository, usingGitOps
principles. - Deploy and manage your application via Argo CD.
After finishing all the steps from this tutorial, you should have a DOKS
cluster with Argo CD
deployed.
-
Add the Argo CD Helm repository:
helm repo add argo https://argoproj.github.io/argo-helm helm repo update argo
-
Inspect the Argo CD Helm values file.
code argo/argo-values.yaml
-
Deploy Argo CD to your DOKS cluster:
HELM_CHART_VERSION="4.9.7" helm install argocd argo/argo-cd --version "${HELM_CHART_VERSION}" \ --namespace argocd \ --create-namespace \ -f "argo/values.yaml"
-
Check if the Helm release was successful:
helm ls -n argocd
-
The output looks similar to (
STATUS
column value should be set todeployed
):NAME NAMESPACE REVISION UPDATED STATUS CHART APP VERSION argocd argocd 1 2022-03-23 11:22:48.486199 +0200 EET deployed argo-cd-4.2.1 v2.3.1
-
Verify Argo CD application deployment status:
kubectl get deployments -n argocd
The output looks similar to (check the
READY
column - allPods
must be running):NAME READY UP-TO-DATE AVAILABLE AGE argocd-applicationset-controller 1/1 1 1 2m9s argocd-dex-server 1/1 1 1 2m9s argocd-notifications-controller 1/1 1 1 2m9s argocd-redis-ha-haproxy 3/3 3 3 2m9s argocd-repo-server 2/2 2 2 2m9s argocd-server 2/2 2 2 2m9s
Argo CD server must have a
replicaset
minimum value of2
for theHA
mode. If for some reason some deployments are not healthy, please check Kubernetes events and logs for the affected component Pods.
- Port forward the
argocd-server
Kubernetes servicekubectl port-forward svc/argocd-server -n argocd 8080:443
- Open a web browser and navigate to localhost:8080 (please ignore the invalid TLS certificates for now). You will be greeted with the Argo CD log in page. The default administrator username is
admin
, and the password is generated randomly at installation time. You can fetch it by running below command:kubectl -n argocd get secret argocd-initial-admin-secret -o jsonpath="{.data.password}" | base64 -d; echo
- Next, you will be redirected to the applications dashboard page. From here you can view, create or manage applications via the UI (an YAML editor is also available), as well as perform sync or refresh operations:
On a fresh install, Argo CD doesn't know where to sync your applications from, or what Git repositories are available for sourcing application manifests. So, the first step is to perform a one time operation called bootstrapping. You can perform all the operations presented in this section by either using the argocd CLI, or the graphical user interface.