In simple words
- Argo CD: a GitOps tool for Kubernetes that watches Git and syncs your cluster to it.
- Argo CD components: the API server (UI and CLI), the repo server (reads Git) and the application controller (compares and syncs).
- argocd CLI: the command-line tool for logging in to Argo CD and managing apps.
Big picture
Argo CD runs inside your Kubernetes cluster as a few pods. It reads Git, compares it with the cluster and applies the difference. You talk to it through a web UI, a CLI, or YAML.
The parts
| Part | Job |
|---|---|
| API server | The web UI, the CLI and the API |
| Repo server | Reads Git and turns Helm or Kustomize into plain YAML |
| Application controller | Compares Git with the cluster and syncs |
| Redis | A cache so it is fast |
| ApplicationSet controller | Makes many Applications from one template (lesson 9) |
| Notifications controller | Sends messages to Slack, email and more (lesson 13) |
| Dex (optional) | Single sign-on with GitHub, Google, Okta and others |
Install
You need a cluster (kind, minikube or a cloud one) and kubectl.
kubectl create namespace argocdkubectl apply -n argocd --server-side --force-conflicts \ -f https://raw.githubusercontent.com/argoproj/argo-cd/v2.13.0/manifests/install.yamlkubectl get pods -n argocd--server-side is needed because some Argo CD definitions (CRDs) are too big for a normal kubectl apply. Without it you may see metadata.annotations: Too long. Use a version tag such as v2.13.0 (check the Argo CD releases page for the newest).
NAME READY STATUS RESTARTS AGEargocd-application-controller-0 1/1 Running 0 60sargocd-applicationset-controller-7d9c6b5f4-r8k2n 1/1 Running 0 60sargocd-dex-server-6c8b5d7f9-h5tqw 1/1 Running 0 60sargocd-notifications-controller-5f7d8c6b9-p2xvz 1/1 Running 0 60sargocd-redis-7c8d9f5b6-m4tnh 1/1 Running 0 60sargocd-repo-server-6d4c5f7b8-xk2lp 1/1 Running 0 60sargocd-server-5b7f9c6d4-q9wzr 1/1 Running 0 60sAll pods should reach Running in a minute or two.
Which install file
| File | What you get | Use it for |
|---|---|---|
manifests/install.yaml | Everything, cluster-wide rights | Learning, one cluster |
manifests/ha/install.yaml | Same, with several replicas | Production (lesson 15) |
manifests/namespace-install.yaml | Only works inside its own namespace | Shared clusters, no cluster-admin |
manifests/core-install.yaml | No UI and no API server | Minimal setups driven only by YAML |
Open the UI
kubectl port-forward svc/argocd-server -n argocd 8080:443argocd admin initial-password -n argocdIf you do not have the CLI yet, read the Secret directly:
kubectl -n argocd get secret argocd-initial-admin-secret -o jsonpath="{.data.password}" | base64 -dOpen https://localhost:8080. The user is admin, and the password is the text printed by the second command.
Install the CLI
brew install argocdargocd login localhost:8080 --username admin --insecure'admin:login' logged in successfullyContext 'localhost:8080' updatedNow change the password and check the versions:
argocd account update-passwordargocd version --shortargocd: v2.13.0argocd-server: v2.13.0After this you may delete the first-password Secret: kubectl -n argocd delete secret argocd-initial-admin-secret.
Install with Helm (for real clusters)
helm repo add argo https://argoproj.github.io/argo-helmhelm install argocd argo/argo-cd -n argocd --create-namespace -f values.yamlHelm lets you keep settings, such as high availability and SSO, in a values file in Git.
Common mistakes
- Leaving the
adminaccount and the first password in use. Change it, or turn on SSO and disable admin. - Exposing the UI to the internet with no TLS.
- Using the
install.yamlfile with no pinned version. Use a version tag, for examplev2.13.0, notstable. - Running
kubectl applywithout--server-sideand hitting the "annotations too long" error. - Forgetting that the CLI and the server should be close in version.
Summary
- Argo CD is a few pods in your cluster: API server, repo server, controller, Redis.
- Install with
kubectl applyfor learning and Helm for real use. - Log in to the UI with
adminand the initial secret, then change it.
CHECK YOUR UNDERSTANDING
3 quick questions
1. Which Argo CD part turns Helm and Kustomize into plain YAML?
2. How do you find the first admin password?
3. Why pin the install manifest to a version tag?
You've finished the free preview of GitOps with Argo CD
Upgrade to Pro to unlock the remaining 17 lessons, every practice lab and a certificate when you finish.
See plans