Use this when you need to apply cluster changes manually (or merge Git changes) without Fleet immediately reconciling and overwriting resources.
On the management cluster (Fleet runs here; often the same cluster as Rancher), disable the gitops-core GitRepo:
kubectl patch gitrepo gitops-core -n fleet-default --type=merge -p '{"spec":{"disabled":true}}'Confirm:
kubectl get gitrepo gitops-core -n fleet-default -o jsonpath='{.spec.disabled}{"\n"}'Expected: true
kubectl patch gitrepo gitops-core -n fleet-default --type=merge -p '{"spec":{"disabled":false}}'Fleet will reconcile from branch / paths in fleet-gitrepo.yaml.
If spec.disabled is not available on your Rancher/Fleet version, use Continuous Delivery → Git Repos → gitops-core in the Rancher UI and pause/resume there, or scale the controllers below.
Only if your Fleet version does not support spec.disabled or you need to stop all GitOps:
kubectl -n cattle-fleet-system scale deployment fleet-controller --replicas=0
kubectl -n cattle-fleet-local-system scale deployment fleet-agent --replicas=0Restore:
kubectl -n cattle-fleet-system scale deployment fleet-controller --replicas=1
kubectl -n cattle-fleet-local-system scale deployment fleet-agent --replicas=1(Replica counts may differ in your environment; use kubectl get deploy -n cattle-fleet-system first.)