← Back to Home
βš™οΈ

Installing Argo CD & Your First Application

From zero to a live app deployed straight from Git.

⏱10 min readπŸ“šDevOps Fundamentals

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


Step 1 β€” Install Argo CD

Argo CD installs as a set of pods in its own namespace:

bash
kubectl create namespace argocd
kubectl apply -n argocd -f \
https://raw.githubusercontent.com/argoproj/argo-cd/stable/manifests/install.yaml
bash β€” 80Γ—24
student@devops:~$kubectl get pods -n argocd

The 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:

bash
# 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.”

yaml
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=true

Apply it like any manifest:

bash
kubectl apply -f guestbook-app.yaml

Step 4 β€” Sync It

Right after creation the app is OutOfSync β€” defined in Git but not yet applied. Sync it to deploy:

bash
# via CLI
argocd app sync guestbook

# check status
argocd app get guestbook
bash β€” 80Γ—24
student@devops:~$argocd app get guestbook

Synced + 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

Knowledge Check

What does an Argo CD Application resource define?

Knowledge Check

Immediately after you create an Application (before syncing), what is its sync status?


πŸ’Ό Interview Preparation

Interview Q&A

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.

Up Next

Sync Strategies, Health & Self-Healing

You've mastered this lesson. Continue your journey to becoming a DevOps Engineer.

Start Next Lesson→