- Log in to Argo CD via the CLI
- Create an application from a Git repo
- Sync and monitor application status
- Enable automated sync, self-heal, and auto-prune
- Test self-heal behavior and observe Kubernetes events
- Use
argocd app waitto block until sync completes
Login to Argo CD
In this environment Argo CD is exposed via a NodePort onlocalhost:30080. Authenticate with the admin account from the CLI:
This login uses plaintext credentials and
--insecure (disables TLS verification). It’s acceptable for lab environments but should never be used in production. For production, use secure credentials and TLS.Create the application
Create an Argo CD Application namedweb-frontend that points to the example repository and guestbook path:
applications namespace yet:
Sync the application
Deploy the resources defined in Git by triggering a sync:applications namespace:
Enable automated sync, self-heal, and auto-prune
By default Argo CD Applications use Manual sync. To have Argo CD automatically reconcile the live cluster to the Git state, and to prune removed resources, enable the following settings. Set automated sync:Test self-heal behavior
Simulate an out-of-band change by scaling the deployment directly with kubectl:Wait for sync to complete
If you need to block until an application reaches Synced (and optionally Healthy), use:Common Argo CD CLI commands
References and further reading
- Argo CD official docs: https://argo-cd.readthedocs.io/
- GitOps with Argo CD: https://argo-cd.readthedocs.io/en/stable/getting_started/
- Kubernetes docs: https://kubernetes.io/docs/