Day 1: Installing Argo CD
Goal: Argo CD runs in the
argocdnamespace, is reachable through a NodePort, and you are logged in via CLI and browser. · Duration: approx. 40 min · Prerequisite: Day 0
Briefing
- Argo CD consists of several services. The most important: the repo-server fetches Git and renders the manifests, the application-controller compares them with the cluster and reconciles, the server provides the API and web UI.
- You install it with a single manifest file or the Helm chart
argo/argo-cd. This book uses the manifest file because it lets you see exactly what ends up in the cluster. On Day 14 you use it to upgrade Argo CD to a new version. - The configuration lives in ConfigMaps and Secrets in the
argocdnamespace, above allargocd-cm,argocd-rbac-cm, andargocd-secret.
argocd CLI / Browser ──► argocd-server (API, UI) ──► Redis (cache)
│
┌─────────────────┴──────────────────┐
▼ ▼
argocd-repo-server ◄── Git argocd-application-controller ──► Kubernetes API
(fetches, renders) (compares, reconciles)
Drill 1: The Manifest File
mkdir -p ~/argo-lab/tag01
cd ~/argo-lab/tag01
curl -fsSLO \
https://raw.githubusercontent.com/argoproj/argo-cd/v3.5.7/manifests/install.yaml
wc -l install.yamlExpected:
34050 install.yaml
Over 34,000 lines, most of them the three CRDs. grep
shows which kinds of objects are inside:
grep -c "^kind: CustomResourceDefinition" install.yaml
grep -c "^kind: Deployment" install.yaml
grep -c "^kind: StatefulSet" install.yamlExpected:
3
6
1
Six Deployments and one StatefulSet, which is the application-controller. It holds the state of all applications and therefore runs with a stable name.
Save your progress? Sign up for free
Drill 2: Install
kubectl create namespace argocd
kubectl apply -n argocd --server-side --force-conflicts -f install.yamlExpected (abridged):
namespace/argocd created
customresourcedefinition.apiextensions.k8s.io/applications.argoproj.io serverside-applied
customresourcedefinition.apiextensions.k8s.io/applicationsets.argoproj.io serverside-applied
customresourcedefinition.apiextensions.k8s.io/appprojects.argoproj.io serverside-applied
…
networkpolicy.networking.k8s.io/argocd-server-network-policy serverside-applied
Tried it: Without
--server-side, a single object fails:The CustomResourceDefinition "applicationsets.argoproj.io" is invalid: metadata.annotations: Too long: may not be more than 262144 bytes. A regularkubectl applystores a copy of the whole object as an annotation, and the CRD is too large for that. Server-side apply does not need this annotation.--force-conflictstakes over fields that another manager has set, for example on the second run.
kubectl -n argocd rollout status deploy/argocd-server
kubectl -n argocd get podsExpected (abridged, your names will differ):
deployment "argocd-server" successfully rolled out
NAME READY STATUS RESTARTS AGE
argocd-application-controller-0 1/1 Running 0 85s
argocd-applicationset-controller-78d8f6b76-t5r9q 1/1 Running 0 86s
argocd-dex-server-569657dd78-xsfxj 1/1 Running 0 86s
argocd-notifications-controller-7cc66698b7-5nbc6 1/1 Running 0 86s
argocd-redis-66578bc5bc-94rs9 1/1 Running 0 86s
argocd-repo-server-5b5df66788-n6gcs 1/1 Running 0 85s
argocd-server-7d8744db95-snzpd 1/1 Running 0 85s
- applicationset-controller generates applications from templates (Day 8).
- dex-server connects external logins, such as GitHub. The book does not use it.
- notifications-controller sends messages (Day 12).
Together, the seven pods need about 150 MiB of RAM when idle
(kubectl top pods -n argocd).
Save your progress? Sign up for free
Drill 3: Reachable from Outside
The argocd-server Service is only reachable inside the
cluster. Instead of changing it, you create your own NodePort Service
next to it. That way install.yaml stays unchanged, and an
upgrade overwrites nothing of yours:
cat > argocd-nodeport.yaml <<'EOF'
apiVersion: v1
kind: Service
metadata:
name: argocd-server-nodeport
namespace: argocd
spec:
type: NodePort
selector:
app.kubernetes.io/name: argocd-server
ports:
- name: https
port: 443
targetPort: 8080
nodePort: 30443
EOF
kubectl apply -f argocd-nodeport.yamlExpected:
service/argocd-server-nodeport created
argocd-server listens on port 8080 and speaks TLS there
itself, with a self-signed certificate. A test:
curl -sk https://localhost:30443/ | grep -o "<title>.*</title>"Expected:
<title>Argo CD</title>
-k accepts the self-signed certificate. The CLI needs
--insecure for that.
Save your progress? Sign up for free
Drill 4: Log In
During installation, Argo CD generates a random password for the
admin user and stores it in the Secret
argocd-initial-admin-secret. The CLI reads it:
argocd admin initial-password -n argocdExpected (your password will differ):
<16 Zeichen>
This password must be only used for first time login. We strongly recommend you update the password using `argocd account update-password`.
argocd admin talks directly to Kubernetes, not to Argo
CD. That is why it works even before the first login. Now you log in and
enter the password:
argocd login 172.16.0.182:30443 --username admin --insecureExpected:
Password:
'admin:login' logged in successfully
Context '172.16.0.182:30443' updated
You replace the initial password with the lab value
lab-argo-pw-123. The CLI asks for the old one and twice for
the new one:
argocd account update-passwordExpected (abridged):
*** Enter password of currently logged in user (admin):
*** Enter new password for user admin:
*** Confirm new password for user admin:
Password updated
Context '172.16.0.182:30443' updated
Nobody needs the old Secret anymore:
kubectl -n argocd delete secret argocd-initial-admin-secretExpected:
secret "argocd-initial-admin-secret" deleted from argocd namespace
Save your progress? Sign up for free
Drill 5: What the CLI Knows
argocd versionExpected (abridged):
argocd: v3.5.7+6d73296
…
argocd-server: v3.5.7
…
Kustomize Version: v5.8.1 2026-02-09T16:15:27Z
Helm Version: v4.2.1+gd591a19
The server brings its own versions of Kustomize and Helm. The repo-server uses them to render the manifests. Your local Helm plays no role for Argo CD.
argocd cluster listExpected:
SERVER NAME VERSION STATUS MESSAGE PROJECT
https://kubernetes.default.svc in-cluster 1.37.2 Unknown Cluster has no applications and is not being monitored.
in-cluster is the cluster that Argo CD itself runs in. A
second one joins on Day 11. The CLI remembers the login in
~/.config/argocd/config:
argocd contextExpected:
CURRENT NAME SERVER
* 172.16.0.182:30443 172.16.0.182:30443
Save your progress? Sign up for free
Drill 6: The Web UI
Open https://172.16.0.182:30443 in the browser on your
laptop. The browser warns about the self-signed certificate. Accept it
for this lab and log in with admin and
lab-argo-pw-123. The list of applications is still
empty.
The UI talks to the same API as the CLI. Everything you do via the CLI in this book can also be found there, and vice versa.
Save your progress? Sign up for free
Drill 7: Where the Configuration Lives
kubectl -n argocd get configmapsExpected (abridged):
NAME DATA AGE
argocd-cm 9 117s
argocd-cmd-params-cm 0 117s
argocd-gpg-keys-cm 0 117s
argocd-notifications-cm 0 117s
argocd-rbac-cm 0 117s
argocd-ssh-known-hosts-cm 1 117s
argocd-tls-certs-cm 0 117s
| ConfigMap | Contents | Day |
|---|---|---|
argocd-cm |
Main configuration: users, SSO, resource rules | 6, 9, 10 |
argocd-rbac-cm |
Permissions | 9 |
argocd-ssh-known-hosts-cm |
Host keys of Git servers, GitHub is already included | 2 |
argocd-notifications-cm |
Templates and triggers for messages | 12 |
Passwords and keys live in argocd-secret, never in a
ConfigMap.
Save your progress? Sign up for free
Checkpoint
kubectl -n argocd get deploy,statefulsetExpected: six Deployments and one StatefulSet, all with
1/1 under READY.
argocd account get-user-infoExpected:
Logged In: true
Username: admin
Issuer: argocd
Groups:
kubectl -n argocd get svc argocd-server-nodeportExpected: type NodePort with
443:30443/TCP.
Challenge
Log out via the CLI and log back in, this time without a prompt, with
user and password on the command line. Then check that
argocd cluster list answers again.
Hint: argocd logout <server> and
argocd login --help.
Solution
argocd logout 172.16.0.182:30443 --insecure
argocd login 172.16.0.182:30443 --username admin --password lab-argo-pw-123 --insecure
argocd cluster listExpected (abridged):
Logged out from '172.16.0.182:30443'
{"level":"info","msg":"token successfully invalidated on server",…}
'admin:login' logged in successfully
Context '172.16.0.182:30443' updated
SERVER NAME VERSION STATUS …
https://kubernetes.default.svc in-cluster 1.37.2 Unknown …
Tried it: Without
--insecure,logoutasksProceed insecurely (y/n)?.logoutrevokes the token on the server and checks the certificate again in the process. The setting from the login does not apply to that.
A password on the command line ends up in the shell history. In the lab that does not matter; in production you use SSO or tokens for machines (Day 9).
Save your progress? Sign up for free
Enterprise Note
- For high availability there is
ha/install.yaml: multiple replicas, Redis with Sentinel. A single node gains nothing from it. - The web UI belongs behind an Ingress or Gateway with a real certificate instead of a NodePort with a self-signed one.
- You disable the
adminaccount after setting up SSO (admin.enabled: "false"inargocd-cm). - Many teams install Argo CD with the Helm chart and then manage it with itself. Day 7 shows the principle.