CareerByteCode
ByteBlogby CareerByteCode

Argo CD on Kubernetes: GitOps from Zero

What you build: a GKE cluster that deploys itself from Git with Argo CD, heals hand changes and rolls back with git revert, in your own Google Cloud account. Every step tested.

Argo CD on Kubernetes: GitOps from Zero

✍️ Translate this blog into Hindi, Tamil or Telugu

In this lab you build a Kubernetes cluster that deploys itself from Git. You install Argo CD on a small Google Kubernetes Engine (GKE) cluster, put your app's YAML files in a Git repository, and from then on you never run kubectl apply for the app again: you change Git, and Argo CD changes the cluster. You will also watch Argo CD undo a change someone made by hand, ship a bad release on purpose, and roll it back with one git revert.

Who it is for: people who know basic Kubernetes words (pod, deployment, service) and want their first real GitOps setup. Time: about 1.5 to 2 hours. Cost: about USD 0.50 if you finish in one sitting. A 2-node GKE cluster costs about USD 0.30 an hour and the free trial credit covers it. Delete the cluster at the end.

Every command below was run for real by the CareerByteCode Team on a fresh Google Cloud project, and every output and screenshot is the real result we got, including two mistakes we made on the way. We typed the commands in a Cloud Shell-like Linux VM (Debian with gcloud, kubectl and git); Cloud Shell in your browser has the same tools ready.

🧪⭐ Recommended by CareerByteCode · ByteLabs project bundleCloud and DevOps Realtime Starterโ‚น499Build the projects →

To keep the lab free of outside accounts, the Git repository lives on a tiny Git server (Gitea) inside the cluster. At work you would use GitHub or GitLab; the Argo CD part is exactly the same, and we show where the repository address changes.

Part A: GitOps and Argo CD in plain English

GitOps means Git is the single source of truth for what runs in your cluster. Instead of people typing kubectl apply from their laptops, a robot inside the cluster reads Git and makes the cluster match it, all the time.

How GitOps with Argo CD works
You push to Git; Argo CD notices, compares and syncs the cluster; drift is healed

Words you will use in this lab:

  • Desired state: what Git says should run (the YAML files). Real-life example: the architect's drawing of a house.
  • Live state: what really runs in the cluster now. Example: the house as it stands today.
  • Sync: Argo CD makes the live state equal to the desired state. Example: the builder fixes the house to match the drawing.
  • Drift: the live state no longer matches Git, usually because someone changed the cluster by hand. Example: a neighbour painted your door red without changing the drawing.
  • Self-heal: Argo CD puts drifted things back to what Git says, on its own.
  • Prune: when you delete a file from Git, Argo CD also deletes that thing from the cluster.
  • Application: an Argo CD object that says "keep this namespace equal to this folder of this Git repository".
  • Health: Argo CD also checks that what it deployed actually works: Healthy, Progressing or Degraded.

Why companies use it: every change is a Git commit (who, what, when, why), a rollback is a git revert, and nobody needs cluster passwords on their laptop.

Before you start

  1. A Google Cloud account (the free trial works) and a project with billing linked.
  2. Open Cloud Shell (the >_ icon at the top right of the Google Cloud console). It already has gcloud, kubectl and git.
  3. Turn on the Kubernetes Engine API and set your project. Replace the text in quotes with your own project id:
export PROJECT_ID="your-project-id"
gcloud config set project $PROJECT_ID
gcloud services enable container.googleapis.com

Part B: the lab

Step 1: create a small GKE cluster

Why: Argo CD runs inside Kubernetes and deploys into Kubernetes. Two e2-standard-4 nodes (4 vCPU, 16 GB each) are plenty, with no GPU. A zonal cluster (one zone) is the cheapest kind. We used this same cluster for four labs in a row: this one, Prometheus and Grafana, Istio, and Ollama.

gcloud container clusters create lab-cluster \
  --zone=us-east1-b --num-nodes=2 --machine-type=e2-standard-4 \
  --disk-type=pd-standard --disk-size=50 --release-channel=regular \
  --no-enable-autoupgrade --workload-pool=$PROJECT_ID.svc.id.goog

It takes about 5 to 7 minutes. Then check it:

NAME         LOCATION    STATUS   CURRENT_NODE_COUNT  CURRENT_MASTER_VERSION
lab-cluster  us-east1-b  RUNNING  2                   1.36.4-gke.2377000
NAME          MACHINE_TYPE   DISK_SIZE_GB  INITIAL_NODE_COUNT
default-pool  e2-standard-4  50            2

Step 2: connect kubectl to the cluster

Why: get-credentials writes the cluster's address and a sign-in method into ~/.kube/config, so kubectl talks to this cluster.

gcloud container clusters get-credentials lab-cluster --zone=us-east1-b 2>&1 | tail -1
kubectl get nodes
kubeconfig entry generated for lab-cluster.
NAME                                         STATUS   ROLES    AGE   VERSION
gke-lab-cluster-default-pool-27d9254d-1nv1   Ready    <none>   79s   v1.36.4-gke.2377000
gke-lab-cluster-default-pool-27d9254d-rl98   Ready    <none>   78s   v1.36.4-gke.2377000
Cluster and connect
Steps 1 and 2: the cluster runs with 2 nodes and kubectl can see them

Step 3: install Argo CD

Why: Argo CD is installed from one YAML file published by the Argo project. We read the current stable version first and then install exactly that version, so the CLI in the next step matches. --server-side is the method Argo CD recommends for its large custom resource types.

VER=v$(curl -fsSL https://raw.githubusercontent.com/argoproj/argo-cd/stable/VERSION); echo $VER > argocd-version.txt
echo "Argo CD stable version: $VER"
kubectl create namespace argocd
kubectl apply -n argocd --server-side --force-conflicts \
  -f https://raw.githubusercontent.com/argoproj/argo-cd/$VER/manifests/install.yaml | tail -3
kubectl -n argocd rollout status deploy/argocd-server --timeout=300s
kubectl -n argocd rollout status statefulset/argocd-application-controller --timeout=300s
kubectl -n argocd get pods
Argo CD stable version: v3.6.1
namespace/argocd created
networkpolicy.networking.k8s.io/argocd-redis-network-policy serverside-applied
networkpolicy.networking.k8s.io/argocd-repo-server-network-policy serverside-applied
networkpolicy.networking.k8s.io/argocd-server-network-policy serverside-applied
Waiting for deployment "argocd-server" rollout to finish: 0 of 1 updated replicas are available...
deployment "argocd-server" successfully rolled out
partitioned roll out complete: 1 new pods have been updated...
NAME                                               READY   STATUS    RESTARTS   AGE
argocd-application-controller-0                    1/1     Running   0          48s
argocd-applicationset-controller-f6bc6968d-zxcf8   1/1     Running   0          49s
argocd-dex-server-55b9777447-5sqnb                 1/1     Running   0          49s
argocd-notifications-controller-b9499f64b-r4dbj    1/1     Running   0          49s
argocd-redis-79f897d5d9-lsgfb                      1/1     Running   0          48s
argocd-repo-server-75fcf89b6b-pfqr8                1/1     Running   0          48s
argocd-server-67795db55d-nd4hh                     1/1     Running   0          48s

Seven pods, all Running. The important ones: the application controller (compares Git with the cluster and syncs), the repo server (reads Git), the server (the API, web UI and CLI endpoint) and redis (a cache).

Step 4: install the argocd CLI and log in

Why: the argocd command line tool shows the sync status, history and lets you sync by hand. Argo CD creates a random first password for the admin user in a secret. We read it into a variable and never print it; we print only its length.

VER=$(cat argocd-version.txt)
curl -fsSL -o argocd https://github.com/argoproj/argo-cd/releases/download/$VER/argocd-linux-amd64
sudo install -m 555 argocd /usr/local/bin/argocd && rm argocd
argocd version --client --short
# open the Argo CD API on localhost:8080 (keeps running in the background)
nohup kubectl -n argocd port-forward svc/argocd-server 8080:443 > pf-argocd.log 2>&1 &
sleep 5
ADMIN_PASS=$(kubectl -n argocd get secret argocd-initial-admin-secret -o jsonpath="{.data.password}" | base64 -d)
echo "admin password length: ${#ADMIN_PASS} characters (never print it)"
argocd login localhost:8080 --username admin --password "$ADMIN_PASS" --insecure
argocd: v3.6.1+94037c4
admin password length: 16 characters (never print it)
'admin:login' logged in successfully
Context 'localhost:8080' updated
Install Argo CD and log in
Steps 3 and 4: Argo CD v3.6.1 running, CLI installed, logged in as admin

kubectl port-forward makes the Argo CD server answer on localhost:8080 of your shell, with no public IP. In Cloud Shell you can also open the web UI: click Web Preview > Change port > 8080.

Step 5: a small Git server inside the cluster

Why: Argo CD needs a Git repository to read. To avoid any outside account in this lab we run Gitea, a small open-source Git server, as one pod. Save this file as gitea.yaml:

# A tiny Git server (Gitea) inside the cluster, so the lab needs no GitHub account.
apiVersion: apps/v1
kind: Deployment
metadata: {name: gitea}
spec:
  replicas: 1
  selector: {matchLabels: {app: gitea}}
  template:
    metadata: {labels: {app: gitea}}
    spec:
      containers:
      - name: gitea
        image: gitea/gitea:1.24-rootless
        ports: [{containerPort: 3000}]
        env:
        - {name: GITEA__security__INSTALL_LOCK, value: "true"}
        - {name: GITEA__database__DB_TYPE, value: sqlite3}
        - {name: GITEA__server__ROOT_URL, value: "http://gitea.git.svc.cluster.local:3000/"}
        - {name: GITEA__repository__ENABLE_PUSH_CREATE_USER, value: "true"}
        - {name: GITEA__repository__DEFAULT_PUSH_CREATE_PRIVATE, value: "false"}
        resources: {requests: {cpu: 100m, memory: 256Mi}}
        readinessProbe: {httpGet: {path: /api/healthz, port: 3000}, periodSeconds: 3}
        volumeMounts:
        - {name: data, mountPath: /var/lib/gitea}
        - {name: config, mountPath: /etc/gitea}
      volumes:
      - {name: data, emptyDir: {}}
      - {name: config, emptyDir: {}}
---
apiVersion: v1
kind: Service
metadata: {name: gitea}
spec:
  selector: {app: gitea}
  ports: [{port: 3000, targetPort: 3000}]

The readinessProbe matters: our first try had none, Kubernetes said the pod was ready before Gitea was listening, and creating the user failed. With the probe, rollout status waits until Gitea really answers.

kubectl create namespace git
kubectl apply -n git -f gitea.yaml
kubectl -n git rollout status deploy/gitea --timeout=300s
# a lab-only Git user; the password is random and saved in a file, never shown
openssl rand -hex 12 > .gitpass
kubectl -n git exec deploy/gitea -- gitea admin user create --username lab --password "$(cat .gitpass)" \
  --email lab@example.com --must-change-password=false 2>&1 | tail -1
nohup kubectl -n git port-forward svc/gitea 3000:3000 > pf-git.log 2>&1 &
sleep 4; curl -s -o /dev/null -w "Git server answers: HTTP %{http_code}\n" http://localhost:3000/
namespace/git created
deployment.apps/gitea created
service/gitea created
Waiting for deployment "gitea" rollout to finish: 0 of 1 updated replicas are available...
deployment "gitea" successfully rolled out
New user 'lab' has been successfully created!
Git server answers: HTTP 200

Step 6: put version 1 of the app in Git

Why: this is the desired state: a Deployment with one pod of a tiny web server (http-echo) that answers "hello from version 1", and a Service in front of it. We push it to the Git server.

mkdir -p demo-app/k8s && cd demo-app
cat > k8s/deployment.yaml <<'YAML'
apiVersion: apps/v1
kind: Deployment
metadata: {name: web}
spec:
  replicas: 1
  selector: {matchLabels: {app: web}}
  template:
    metadata: {labels: {app: web}}
    spec:
      containers:
      - name: web
        image: hashicorp/http-echo:1.0
        args: ["-text=hello from version 1", "-listen=:5678"]
        ports: [{containerPort: 5678}]
        resources: {requests: {cpu: 20m, memory: 32Mi}}
YAML
cat > k8s/service.yaml <<'YAML'
apiVersion: v1
kind: Service
metadata: {name: web}
spec:
  selector: {app: web}
  ports: [{port: 80, targetPort: 5678}]
YAML
git init -q -b main
git config user.name "Lab Student"; git config user.email "lab@example.com"
git add . && git commit -q -m "version 1: one web pod" && git log --oneline
git push -q "http://lab:$(cat ../.gitpass)@localhost:3000/lab/demo-app.git" main 2>&1 | grep -v "^remote: *$" | head -3
git remote add origin http://localhost:3000/lab/demo-app.git
curl -s http://localhost:3000/api/v1/repos/lab/demo-app | jq -r '"repo on the Git server: " + .full_name + ", private: " + (.private|tostring)'
c94b52c version 1: one web pod
remote: . Processing 1 references        
remote: Processed 1 references in total        
repo on the Git server: lab/demo-app, private: false
Git server and repo
Steps 5 and 6: the Git server answers, version 1 is committed and pushed

At work: create the repository on GitHub or GitLab, push the same k8s/ folder there, and use that repository's https:// address as repoURL in the next step. A private repository also needs argocd repo add with a read-only token or deploy key. We did not test GitHub in this lab.

Step 7: create the Argo CD Application

Why: the Application is the link between Git and the cluster. Save it as application.yaml:

# The Argo CD Application: "keep namespace demo equal to folder k8s/ of the demo-app repo"
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
  name: demo-app
  namespace: argocd
spec:
  project: default
  source:
    repoURL: http://gitea.git.svc.cluster.local:3000/lab/demo-app.git
    targetRevision: main
    path: k8s
  destination:
    server: https://kubernetes.default.svc
    namespace: demo
  syncPolicy:
    automated:
      prune: true
      selfHeal: true
    syncOptions:
    - CreateNamespace=true
  • repoURL, targetRevision, path: read folder k8s of branch main.
  • destination: deploy into namespace demo of this same cluster.
  • automated with prune and selfHeal: sync on its own, delete removed things, and undo drift.
  • CreateNamespace=true: create demo if it does not exist.
kubectl apply -f application.yaml
# wait until Argo CD has copied Git into the cluster
for i in $(seq 1 30); do
  S=$(kubectl -n argocd get application demo-app -o jsonpath='{.status.sync.status} {.status.health.status}')
  [ "$S" = "Synced Healthy" ] && break; sleep 5
done
echo "after $((i*5)) seconds: $S"
argocd app get demo-app | grep -v "^URL\|^Server:"
kubectl -n demo get deploy,svc,pods
application.argoproj.io/demo-app created
after 10 seconds: Synced Healthy
Name:               argocd/demo-app
Project:            default
Namespace:          demo
Source:
- Repo:             http://gitea.git.svc.cluster.local:3000/lab/demo-app.git
  Target:           main
  Path:             k8s
SyncWindow:         Sync Allowed
Sync Policy:        Automated (Prune)
Sync Status:        Synced to main (c94b52c)
Health Status:      Healthy

GROUP  KIND        NAMESPACE  NAME  STATUS   HEALTH   HOOK  MESSAGE
       Namespace              demo  Running  Synced         namespace/demo created
       Service     demo       web   Synced   Healthy        service/web created
apps   Deployment  demo       web   Synced   Healthy        deployment.apps/web created
NAME                  READY   UP-TO-DATE   AVAILABLE   AGE
deployment.apps/web   1/1     1            1           5s

NAME          TYPE        CLUSTER-IP      EXTERNAL-IP   PORT(S)   AGE
service/web   ClusterIP   CLUSTER_IP   <none>        80/TCP    5s

NAME                      READY   STATUS    RESTARTS   AGE
pod/web-9b647759d-b8vwt   1/1     Running   0          5s
The Application is synced
Step 7: Synced to main (c94b52c) and Healthy after 10 seconds

Synced to main (c94b52c) is the commit id from Step 6. Argo CD created the namespace, the service and the deployment by itself. You never ran kubectl apply for the app.

Step 8: push version 2 and watch Argo CD deploy it

Why: this is the daily GitOps workflow: change a file, commit, push. We change the text and go from 1 to 2 pods. Argo CD checks Git every 3 minutes; --refresh asks it to look now, and argocd app wait waits until it is synced and healthy.

cd demo-app
sed -i 's/hello from version 1/hello from version 2/; s/replicas: 1/replicas: 2/' k8s/deployment.yaml
git commit -q -am "version 2: new text, two pods" && git log --oneline | head -2
git push -q "http://lab:$(cat ../.gitpass)@localhost:3000/lab/demo-app.git" main 2>&1 | head -2
# Argo CD checks Git every 3 minutes; "refresh" asks it to look now
argocd app get demo-app --refresh > /dev/null
argocd app wait demo-app --sync --health --timeout 180 > /dev/null && echo "synced and healthy"
argocd app get demo-app -o json | jq -r '"revision now: " + .status.sync.revision[0:7]'
kubectl -n demo rollout status deploy/web --timeout=120s
kubectl -n demo get pods
# call the app from a short-lived test pod inside the cluster
kubectl -n demo run curl-test --restart=Never --image=curlimages/curl:8.10.1 -- curl -s -m 10 --retry 5 --retry-all-errors http://web.demo > /dev/null
kubectl -n demo wait pod/curl-test --for=jsonpath='{.status.phase}'=Succeeded --timeout=90s > /dev/null
kubectl -n demo logs curl-test; kubectl -n demo delete pod curl-test --wait=false > /dev/null
0717804 version 2: new text, two pods
c94b52c version 1: one web pod
remote: . Processing 1 references        
remote: Processed 1 references in total        
synced and healthy
revision now: 0717804
deployment "web" successfully rolled out
NAME                   READY   STATUS    RESTARTS   AGE
web-54544d87bc-fs9w7   1/1     Running   0          2s
web-54544d87bc-h2rzw   1/1     Running   0          3s
hello from version 2
🎓⭐ Recommended by CareerByteCode · Live trainingCloud & DevOps Live Cohort Internshipโ‚น2,360See the training →
Version 2 deployed from Git
Step 8: commit 0717804 is live: 2 pods, and the app answers hello from version 2

Break it and fix it (1): someone changes the cluster by hand

A teammate scales the deployment to 5 pods and deletes the service with kubectl, outside Git. With selfHeal: true Argo CD should put both back.

# Break it: someone changes the cluster by hand (not through Git)
kubectl -n demo scale deploy/web --replicas=5
kubectl -n demo delete service web
sleep 2; kubectl -n demo get deploy web; kubectl -n demo get svc 2>&1
# Argo CD sees the drift and heals it back to what Git says
sleep 30
echo "--- 30 seconds later ---"
kubectl -n demo get deploy web; kubectl -n demo get svc web
argocd app get demo-app -o json | jq -r '"sync: " + .status.sync.status + ", health: " + .status.health.status'
deployment.apps/web scaled
service "web" deleted from demo namespace
NAME   READY   UP-TO-DATE   AVAILABLE   AGE
web    2/2     2            2           35s
NAME   TYPE        CLUSTER-IP      EXTERNAL-IP   PORT(S)   AGE
web    ClusterIP   CLUSTER_IP   <none>        80/TCP    0s
--- 30 seconds later ---
NAME   READY   UP-TO-DATE   AVAILABLE   AGE
web    2/2     2            2           65s
NAME   TYPE        CLUSTER-IP      EXTERNAL-IP   PORT(S)   AGE
web    ClusterIP   CLUSTER_IP   <none>        80/TCP    30s
sync: Synced, health: Healthy
Self-heal
Argo CD healed the drift: still 2 pods, and the service is back (age 0s)

Argo CD was faster than our 2-second pause: by the time we looked, the deployment was already back to 2 pods and the service had been re-created (AGE 0s). Thirty seconds later everything is Synced and Healthy. Lesson: with self-heal on, hand changes do not stick. Change Git instead.

Break it and fix it (2): a bad release and a rollback

We push version 3 with an image tag that does not exist (hashicorp/http-echo:9.9.9).

cd demo-app
# a bad release: an image tag that does not exist
sed -i 's#hashicorp/http-echo:1.0#hashicorp/http-echo:9.9.9#' k8s/deployment.yaml
git commit -q -am "version 3: bad image tag" && git push -q "http://lab:$(cat ../.gitpass)@localhost:3000/lab/demo-app.git" main
argocd app get demo-app --refresh > /dev/null; sleep 45
argocd app get demo-app -o json | jq -r '"sync: " + .status.sync.status + ", health: " + .status.health.status'
kubectl -n demo get pods
remote: . Processing 1 references        
remote: Processed 1 references in total        
sync: Synced, health: Progressing
NAME                   READY   STATUS             RESTARTS   AGE
web-54544d87bc-fs9w7   1/1     Running            0          105s
web-54544d87bc-h2rzw   1/1     Running            0          106s
web-dfb8f9465-5p585    0/1     ImagePullBackOff   0          46s

Argo CD synced the bad commit (sync Synced), but health is Progressing: the new pod is stuck in ImagePullBackOff because the image cannot be downloaded. The two old pods keep serving users, because a Deployment only removes old pods when new ones are ready. Fix: undo the bad commit in Git with git revert, which adds a new commit that reverses it.

cd demo-app
# roll back the GitOps way: undo the bad commit in Git
git revert --no-edit HEAD > /dev/null && git log --oneline | head -4
git push -q "http://lab:$(cat ../.gitpass)@localhost:3000/lab/demo-app.git" main
argocd app get demo-app --refresh > /dev/null
argocd app wait demo-app --sync --health --timeout 180 > /dev/null && echo "synced and healthy again"
kubectl -n demo get pods
argocd app history demo-app
509da43 Revert "version 3: bad image tag"
b32453f version 3: bad image tag
0717804 version 2: new text, two pods
c94b52c version 1: one web pod
remote: . Processing 1 references        
remote: Processed 1 references in total        
synced and healthy again
NAME                   READY   STATUS        RESTARTS   AGE
web-54544d87bc-fs9w7   1/1     Running       0          117s
web-54544d87bc-h2rzw   1/1     Running       0          118s
web-dfb8f9465-5p585    0/1     Terminating   0          58s
SOURCE  http://gitea.git.svc.cluster.local:3000/lab/demo-app.git
ID      DATE                           REVISION
0       2026-11-18 14:55:04 +0000 UTC  main (c94b52c)
1       2026-11-18 14:55:20 +0000 UTC  main (0717804)
2       2026-11-18 14:56:21 +0000 UTC  main (b32453f)
3       2026-11-18 14:57:18 +0000 UTC  main (509da43)
Rollback with git revert
The revert commit 509da43 is synced and healthy; the history shows all 4 deployments

argocd app history lists every deployment with its commit. That history, plus the Git log, is your audit trail: who changed what, and when.

POC: prove it works

  • Step 7: Argo CD created the app from Git on its own: Synced to main (c94b52c), Healthy.
  • Step 8: a git push changed the live app: hello from version 2 from 2 pods.
  • Break it (1): a hand change was undone in seconds.
  • Break it (2): a bad release was rolled back with one git revert, and the history shows 4 revisions.

Clean up (delete everything)

Why: Argo CD and the Git server are cheap, but the cluster is not. First remove the app (Argo CD deletes what it deployed), Argo CD itself (including its cluster-wide types and roles) and the Git server.

argocd app delete demo-app --yes --wait 2>&1 | tail -1
pkill -f "port-forward svc/argocd-server"; pkill -f "port-forward svc/gitea"
VER=$(cat argocd-version.txt)
kubectl delete -n argocd --ignore-not-found -f https://raw.githubusercontent.com/argoproj/argo-cd/$VER/manifests/install.yaml > /dev/null && echo "Argo CD removed (incl. its cluster-wide types and roles)"
kubectl delete namespace demo git argocd --ignore-not-found --wait=true
echo "namespaces left from this lab: $(kubectl get ns demo git argocd --no-headers 2>/dev/null | wc -l)"
echo "Argo CD types left: $(kubectl get crd -o name | grep -c argoproj.io)"
application 'demo-app' deleted
Warning: deleting cluster-scoped resources, not scoped to the provided namespace
Argo CD removed (incl. its cluster-wide types and roles)
namespace "demo" deleted
namespace "git" deleted
namespace "argocd" deleted
namespaces left from this lab: 0
Argo CD types left: 0

If you are not doing another Kubernetes lab now, delete the cluster. We did this after our fourth lab on the same cluster:

gcloud container clusters delete lab-cluster --zone=us-east1-b --quiet 2>&1 | tail -1
echo "clusters left: $(gcloud container clusters list --format="value(name)" | wc -l)"
echo "cluster disks left: $(gcloud compute disks list --filter="name~^gke-lab-cluster OR name~^pvc-" --format="value(name)" | wc -l)"
echo "load balancers left: $(gcloud compute forwarding-rules list --format="value(name)" | wc -l)"
Deleted [https://container.googleapis.com/v1/projects/your-project-id/zones/us-east1-b/clusters/lab-cluster].
clusters left: 0
cluster disks left: 0
load balancers left: 0
Clean up
0 lab namespaces, 0 Argo CD types, 0 clusters, 0 disks, 0 load balancers

FAQ

Is Argo CD a CI tool? No. CI (Cloud Build, GitHub Actions, Jenkins) builds and tests your code and pushes an image. Argo CD is CD: it deploys what Git describes. A common setup: CI builds image v42 and updates the image tag in the Git repo; Argo CD deploys it.

Push or pull: what is the difference? In a push pipeline, the CI server runs kubectl apply and needs cluster credentials. In GitOps, Argo CD runs inside the cluster and pulls from Git. No outside tool needs cluster credentials.

Why not just turn off self-heal? You can, and then Argo CD only shows the app as OutOfSync. Teams often start that way, then turn self-heal on once everyone changes Git instead of the cluster.

Can one Argo CD manage many clusters? Yes. Add clusters with argocd cluster add and point each Application at a different destination.server.

Does Argo CD support Helm and Kustomize? Yes. path can point to a Helm chart or a Kustomize folder, and Argo CD renders it before syncing.

Where do secrets go? Not as plain text in Git. Use Sealed Secrets, the External Secrets Operator with Secret Manager, or the Secret Manager CSI driver.

What did the whole lab cost us? The cluster ran about 1 hour for all four labs; the Argo CD part was about 20 minutes of that, a few rupees.

Troubleshooting

You seeWhyFix
command terminated with exit code 1 when creating the Gitea userThe pod was "ready" before Gitea listenedAdd the readinessProbe from Step 5
fatal: Authentication failed on git pushWrong user or password, or an old Git server with a different passwordCheck the user; delete the namespace and start Step 5 again
App stays OutOfSyncArgo CD has not looked at Git yetargocd app get demo-app --refresh or wait up to 3 minutes
Health Progressing for minutes, pod ImagePullBackOffWrong image name or tagFix the tag in Git (or git revert) and push
Unable to create application: ... repository not accessibleWrong repoURL or a private repo without credentialsCheck the URL; for a private repo run argocd repo add
curl from a test pod times out right after a deployNew pods were not ready yetkubectl rollout status first, and retry
argocd login fails with connection refusedThe port-forward stoppedStart kubectl -n argocd port-forward svc/argocd-server 8080:443 again

What next

Prepared by the CareerByteCode Team from our tested lab, with AI help for the write-up.

Read next →Flux CD vs Argo CD: Hands-On GitOps Comparison⏱ 15 min

⭐ Keep learning with CareerByteCode

Hand-picked to go deeper on this topic
News, guides and updates from the CareerByteCode team
🏅 Expert writer

The CareerByteCode team writes about what is new on careerbytecode.in: courses, labs, exams, events and the community, which is free to join for influencers and content creators in tech.

Get CareerByteCode Team's next blog by email

One email a week when they publish. Add the weekly Best of ByteBlog too. No spam, unsubscribe with one click.

We email you once to confirm. By subscribing you agree to the privacy policy.

💬 Comments (0)

Top · Newest

Sign in to comment

Related blogs

🧪⭐ Recommended by CareerByteCode · ByteLabs project bundleCloud and DevOps Realtime Starterโ‚น499Build the projects →