Interview Prep/GitOps & Argo CD/Secrets, Controller Performance & Recovery

The application controller is OOMKilled repeatedly after onboarding a large cluster.

AdvancedTroubleshootingSecrets, Controller Performance & Recovery
Answer

Likely causes → The controller caches every watched resource of every managed cluster; big clusters with many Events, Pods, ReplicaSets or CRs (Velero backups, Kyverno reports) blow up memory.

Diagnose →

argocd admin cluster stats
kubectl -n argocd top pod -l app.kubernetes.io/name=argocd-application-controller

Fix → Exclude noisy kinds:

# argocd-cm
data:
  resource.exclusions: |
    - apiGroups: ["kyverno.io", "wgpolicyk8s.io"]
      kinds: ["*"]
      clusters: ["*"]

Raise memory limits, and shard with more controller replicas (ARGOCD_CONTROLLER_REPLICAS).

Prevent → Review exclusions when onboarding clusters; watch argocd_cluster_api_resource_objects.

All GitOps & Argo CD questions Roadmap: Argo CD (GitOps)

More on Secrets, Controller Performance & Recovery