Demonstrates Argo CD GitOps manual reconciliation, showing how in-cluster changes cause OutOfSync and how syncing from Git restores desired state.
In this lesson we perform a manual reconciliation of an Argo CD application to illustrate why making ad-hoc changes directly in the Kubernetes cluster results in an OutOfSync state. You will:
Confirm cluster namespaces.
Synchronize an Argo CD application from Git.
Inspect the resulting live resources.
Make an intentional manual change in-cluster to cause drift.
Observe Argo CD detecting the OutOfSync state and restore the desired state by synchronizing from Git.
In the Argo CD web UI, click “Synchronize” for the application. Choose to auto-create the namespace if prompted and synchronize both the Deployment and Service manifests. Argo CD will apply those manifests and report the created ReplicaSet and Service details (such as the NodePort).
You can inspect logs, events, and a summary of the applied YAML from the Argo CD UI.
After synchronization, the highway-animation namespace should exist:
# kubectl get namespacesNAME STATUS AGEargocd Active 17mdefault Active 3h2mhighway-animation Active 35skube-node-lease Active 3h2mkube-public Active 3h2mkube-system Active 3h2m
List all resources in the highway-animation namespace:
# kubectl -n highway-animation get allNAME READY STATUS RESTARTS AGEpod/highway-animation-c5ccdf6b-5pl4d 1/1 Running 0 47sNAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGEservice/highway-animation-service NodePort 10.100.200.170 <none> 3000:32000/TCP 47sNAME READY UP-TO-DATE AVAILABLE AGEdeployment.apps/highway-animation 1/1 1 1 47sNAME DESIRED CURRENT READY AGEreplicaSet.apps/highway-animation-c5ccdf6b 1 1 1 47s
The app is reachable via the NodePort (e.g., http://localhost:32000) and will render the highway animation. With the Deployment set to 1 replica, you will see one vehicle.
Update the container environment variable POD_COUNT value from '1' to '5'
After saving, Kubernetes will create 4 additional pods and the app will show five vehicles.Important: This manual change modifies the live cluster state but does not update the Git repository. That causes the live state to diverge from the desired state declared in Git.
Because the live cluster has 5 replicas while Git declares 1, Argo CD will detect a difference and mark the application OutOfSync. In the Argo CD UI you can click “Diff” to view the highlighted mismatches between the live and desired manifests.
To restore the cluster to the Git-declared desired state, click “Synchronize” in Argo CD. Argo CD will reconcile the resources and update the live cluster to match the manifests in the repository. In this scenario it will update the Deployment (not the Service) to revert the replica count back to 1.
After synchronization, Argo CD will revert the cluster to the Git desired state and the application will again show a single pod/vehicle.
Never make long-lived configuration changes directly in the cluster. Always update the Git repository with the desired state and let your GitOps operator (Argo CD) reconcile the cluster. This ensures a single source of truth, prevents configuration drift, and makes rollbacks and audits straightforward.