Ravindra BagaleCourses & study guides मराठी

Chapter 86: Argo CD (GitOps)

DevOps

86.9 Troubleshooting OutOfSync and health degraded

Story. Omar's app stayed OutOfSync after every sync. The cause was a ignore difference he needed — a field injected by a mutating webhook. Another day Health was Degraded because the Deployment pods were ImagePullBackOff. He learned to separate sync status (Git vs live) from health status (are the workloads OK?).

Read sync status, health, events and pod logs. Fix Git or the cluster cause, then sync again.
Read sync status, health, events and pod logs. Fix Git or the cluster cause, then sync again.

Why

"Argo is red" is not a diagnosis. Sync and health fail for different reasons.

What — quick table

Symptom Likely cause What to run
OutOfSync forever Diff in fields Git does not own; failed apply argocd app diff, argocd app sync --​dry-​run
Synced + Degraded Pods crash / pull errors / probes kubectl get pods, kubectl describe, logs
Unknown health Hook or progress deadline Application conditions in UI / app get
ComparisonError Bad repo URL, auth, or path repo credentials; argocd repo list
Sync stuck Hook Job pending Check PreSync Jobs and waves

How

  1. argocd app get APP — read Sync and Health.
  2. argocd app diff APP — see the gap.
  3. kubectl get events and pod status in the destination namespace.
  4. Fix Git (wrong image tag) or cluster (ImagePull secrets), then sync.

Example 1: Status read

argocd app get shop-api
kubectl get pods -n shop

Output

Sync Status:        Synced
Health Status:      Degraded
NAME                        READY   STATUS             RESTARTS   AGE
shop-api-7d9f8c6b9-xk2q1    0/1     ImagePullBackOff   0          3m

What it shows: Git applied cleanly (Synced) but the workload is unhealthy. Fix the image, not "Argo sync".

Example 2: Repo auth failure

argocd app get shop-api

Output

Sync Status:        Unknown
Conditions:
  ComparisonError: Failed authentication to git.example.com

Fix. Register the repo with a deploy key or token in Argo CD settings (argocd repo add). Do not put personal passwords in Application YAML.

Ravindra Bagale's Tip

Synced is not the same as Healthy. Always read both lines.

Quick quiz

Q1. OutOfSync means what?

Live state does not match the desired Git state.

Q2. Synced + ImagePullBackOff means?

Manifests applied, but Kubernetes cannot pull the image — fix the image or pull secret.

Q3. Where do you register private Git credentials?

In Argo CD repository settings (CLI or UI), not inside random app YAML secrets on the internet.

Did you understand? Let us try it once more.