Interview Prep/GitOps & Argo CD/Repos, Clusters, Projects & Permissions

A cluster added with namespace scope shows `failed to sync cluster: ... deployments.apps is forbidden: User "system:serviceaccount:kube-system:argocd-manager" cannot list resource "deployments" in API group "apps" at the cluster scope`.

AdvancedTroubleshootingRepos, Clusters, Projects & Permissions
Answer

Likely causes → The ServiceAccount only has Roles in specific namespaces, but the cluster secret has no namespaces field, so the controller tries to watch cluster-wide.

Diagnose → kubectl auth can-i list deployments -A --as system:serviceaccount:kube-system:argocd-manager on the target cluster.

Fix →

argocd cluster add team-ctx --namespace payments --namespace payments-jobs --upsert

This sets namespaces: payments,payments-jobs in the secret. Add clusterResources: "true" only if cluster-scoped kinds are needed and granted.

Prevent → Pair namespace-scoped RBAC with the matching namespaces list, both generated from the same tenant definition.

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

More on Repos, Clusters, Projects & Permissions