ArgoCD’s GitOps model for Kubernetes delivery moves beyond traditional push-based CI/CD (where a pipeline runs kubectl apply) to a pull-based reconciliation loop where ArgoCD continuously monitors Git repositories and automatically brings the cluster state into alignment with the declared desired state. For production organisations, ArgoCD’s most powerful features are: ApplicationSets (templated applications that generate multiple ArgoCD Applications from a single definition — ideal for deploying to multiple clusters or namespaces), Sync Waves (controlling deployment ordering within an application), health checks (custom assessments of whether a deployment is truly healthy), and notifications (Slack/email alerts on deployment events). This guide covers these advanced ArgoCD patterns on RHEL 9 for multi-environment GitOps at scale.
Prerequisites
- ArgoCD installed on a RHEL 9 Kubernetes cluster
Step 1 — App of Apps Pattern
# The App of Apps pattern: one root ArgoCD Application that manages other Applications
# /k8s/argocd-apps/Chart.yaml (Helm chart containing Application manifests)
# Root application (manages other apps)
argocd app create root-app
--repo https://github.com/myorg/k8s-gitops
--path argocd-apps
--dest-server https://kubernetes.default.svc
--dest-namespace argocd
--sync-policy automated
--self-heal
Step 2 — ApplicationSet (Multi-Environment Templating)
# ApplicationSet generates an Application for each environment
apiVersion: argoproj.io/v1alpha1
kind: ApplicationSet
metadata:
name: myapp-environments
namespace: argocd
spec:
generators:
- list:
elements:
- cluster: production
url: https://prod-k8s.example.com:6443
namespace: myapp-prod
- cluster: staging
url: https://staging-k8s.example.com:6443
namespace: myapp-staging
template:
metadata:
name: myapp-{{cluster}}
spec:
project: default
source:
repoURL: https://github.com/myorg/k8s-gitops
path: apps/myapp/{{cluster}}
targetRevision: main
destination:
server: {{url}}
namespace: {{namespace}}
syncPolicy:
automated:
prune: true
selfHeal: true
Step 3 — Sync Waves (Deployment Ordering)
# Control order with sync wave annotations
# Lower wave numbers deploy first; ArgoCD waits for health before advancing
# Namespace and RBAC — wave 1 (deploy first)
apiVersion: v1
kind: Namespace
metadata:
name: myapp
annotations:
argocd.argoproj.io/sync-wave: "1"
---
# Database — wave 2
apiVersion: apps/v1
kind: StatefulSet
metadata:
name: postgres
annotations:
argocd.argoproj.io/sync-wave: "2"
---
# Application — wave 3 (deploy after database is healthy)
apiVersion: apps/v1
kind: Deployment
metadata:
name: myapp
annotations:
argocd.argoproj.io/sync-wave: "3"
Step 4 — Image Updater (Automated Image Updates)
# Install ArgoCD Image Updater
kubectl apply -n argocd -f https://raw.githubusercontent.com/argoproj-labs/argocd-image-updater/stable/manifests/install.yaml
# Annotate the ArgoCD Application to auto-update image tags
argocd app set myapp --annotation 'argocd-image-updater.argoproj.io/image-list=myapp=registry.example.com/myapp'
argocd app set myapp --annotation 'argocd-image-updater.argoproj.io/myapp.update-strategy=latest'
Conclusion
Advanced ArgoCD on RHEL 9 with ApplicationSets enables managing dozens of applications across multiple clusters from a single GitOps repository — the ApplicationSet controller automatically creates and removes ArgoCD Applications as environments are added or removed from the generator configuration. Sync Waves are the solution to the most common GitOps deployment ordering problem: ensuring infrastructure (namespaces, RBAC, database) is deployed and healthy before application workloads that depend on it. Combined with ArgoCD Image Updater, this provides a fully automated GitOps pipeline from code push to production deployment with no manual intervention.
Next steps: How to Install ArgoCD on RHEL 9, How to Monitor Kubernetes with Prometheus on RHEL 9, and How to Install Jenkins on RHEL 9.