How does Server-Side Apply handle ownership transitions between `kubectl` and controllers such as HPA?
AdvancedConceptExtending Kubernetes: Helm, CRDs, Operators & kubectl
Answer
If a manifest sets replicas and an HPA also changes it, each apply fights the HPA. With SSA the field manager owning replicas is the applier unless you omit the field from your manifest, in which case ownership is released to the HPA. Best practice: omit spec.replicas when using an HPA.