Pages

Thursday, 5 March 2026

Introduction to ArgoCD


ArgoCD is a tool for deploying applications in Kubernetes cluster following the GitOps principles. 

ArgoCD GitOps flow:
  • Commit and push infra code changes (Terraform, Helm values etc) to the main branch of your GitHub repository.
  • ArgoCD Sync:
    • Manual: Log in to our ArgoCD Dashboard and click the "Sync" or "Refresh" button on the psmdb-default-sharded application.
    • Automatic: If "Self-Heal" or "Auto-Sync" is enabled, ArgoCD will detect the Git change within ~3 minutes and apply it to the cluster automatically.
  • Monitor the Operator: Once ArgoCD syncs, infra will get changed e.g. operators will see the updated custom resources and then trigger the further actions.

Installation


Installing ArgoCD in a Kubernetes cluster is primarily done using manifests or Helm charts. The most common and recommended approach for beginners is using the Official Argo CD Manifests. 

Prerequisites:
  • A running Kubernetes cluster (v1.22 or later).
  • kubectl command-line tool installed and configured to your cluster.
  • At least 2GB of available memory in your cluster.

Applications


ArgoCD defines custom Kubernetes objects like ApplicationAppProject, settings...which can be defined declaratively using Kubernetes manifests and deployed via kubectl apply to the ArgoCD namespace which is argocd by default.

To check ArgoCD applications:

% kubectl get applications -A  

Dashboard


If you don't know the url of the ArgoCD dashboard, find the IP of the ArgoCD server and port-forward it:

% kubectl get svc argocd-server -n argocd
NAME          TYPE      CLUSTER-IP    EXTERNAL-IP PORT(S)        AGE
argocd-server ClusterIP 172.21.103.127 <none>     80/TCP,443/TCP 1d


By default, ArgoCD includes a built-in admin user with full super-user access. For better security practices, it is recommended that you use the admin account only for the initial configuration, then disable it once all required users have been added.

For this example, we can stick to this default admin user. Its password can be obtain via this command:

% kubectl get secret \
argocd-initial-admin-secret \
-n argocd \
-o jsonpath="{.data.password}" \
| base64 -d

Port forwarding:

% kubectl port-forward svc/argocd-server -n argocd 8080:443
Forwarding from 127.0.0.1:8080 -> 8080
Forwarding from [::1]:8080 -> 8080
Handling connection for 8080
Handling connection for 8080
Handling connection for 8080
Handling connection for 8080
Handling connection for 8080
Handling connection for 8080
...

We can now open the address http://localhost:8080/ in the browser to get the ArgoCD dashboard and log in with credentials above.

If there are no application registered with ArgoCD, we will see something like this:



---