Installing Argo CD & Your First Application
From zero to a live app deployed straight from Git.
Time to get hands-on. In this lesson youβll install Argo CD into a Kubernetes cluster, access its dashboard, and create your first Application that deploys manifests directly from a Git repo.
π― Learning Objectives
- Install Argo CD into a cluster
- Access the Argo CD UI and CLI
- Create an Application (via YAML and CLI)
- Trigger your first sync
Step 1 β Install Argo CD
Argo CD installs as a set of pods in its own namespace:
kubectl create namespace argocd
kubectl apply -n argocd -f \
https://raw.githubusercontent.com/argoproj/argo-cd/stable/manifests/install.yamlThe application-controller is the reconciliation engine; the repo-server fetches and renders manifests from Git; the server hosts the API and UI.
Step 2 β Log In
Get the auto-generated admin password and log in with the CLI:
# initial admin password
kubectl -n argocd get secret argocd-initial-admin-secret \
-o jsonpath="{.data.password}" | base64 -d
# port-forward the UI to your machine
kubectl port-forward svc/argocd-server -n argocd 8080:443
# log in with the CLI
argocd login localhost:8080β Change the default password
The initial admin password is stored in a secret for bootstrap only. Change it immediately (argocd account update-password) and, in real setups, wire Argo CD to your SSO instead of using the local admin account.
Step 3 β Define an Application
An Application is just another Kubernetes resource. It says: βtake the manifests in this Git path and deploy them to this cluster/namespace.β
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: guestbook
namespace: argocd
spec:
project: default
source:
repoURL: https://github.com/your-org/guestbook.git
targetRevision: main
path: k8s # folder in the repo holding the manifests
destination:
server: https://kubernetes.default.svc
namespace: guestbook
syncPolicy:
syncOptions:
- CreateNamespace=trueApply it like any manifest:
kubectl apply -f guestbook-app.yamlStep 4 β Sync It
Right after creation the app is OutOfSync β defined in Git but not yet applied. Sync it to deploy:
# via CLI
argocd app sync guestbook
# check status
argocd app get guestbookSynced + Healthy means the cluster now matches Git and the workloads are running. You just did your first GitOps deploy.
π‘ You can also create apps from the UI
The web UI has a βNew Appβ form that produces the same Application resource. Under the hood itβs identical YAML β prefer committing that YAML to Git so even your apps are managed via GitOps.
π§ͺ Hands-on Lab
Author an Application Manifest
Write an Argo CD Application that deploys manifests from the deploy/ folder of https://github.com/acme/api.git (branch main) into a namespace called api, creating the namespace if needed.
π§ Knowledge Check
What does an Argo CD Application resource define?
Immediately after you create an Application (before syncing), what is its sync status?
πΌ Interview Preparation
Walk through what happens when you create an Argo CD Application and sync it.
Summary
You installed Argo CD, logged in, defined an Application, and performed your first sync. Next, we go deeper into sync strategies, health assessment, and Argo CDβs self-healing.