`kubectl apply --server-side` fails with `Apply failed with 1 conflict: conflict with "kube-controller-manager" using apps/v1: .spec.replicas`.
AdvancedTroubleshootingControl plane, RBAC, webhooks and autoscaling
Answer
Likely causes → Server-side apply tracks field ownership. Another manager (HPA through the controller manager, or another tool) owns .spec.replicas, and your manifest also sets it.
Diagnose →
kubectl get deploy web --show-managed-fields -o yaml | yq '.metadata.managedFields[] | {manager, operation}'
Fix → Remove the field from your manifest so the HPA keeps ownership. Only use --force-conflicts when you intentionally take ownership.
Prevent → Do not set replicas in manifests of HPA-managed workloads; in Argo CD use ignoreDifferences for that field if needed.
More on Control plane, RBAC, webhooks and autoscaling
A developer gets `Error from server (Forbidden): pods is forbidden: User "[email protected]" cannot list resource "pods" in API group "" in the namespace "payments"`.BeginnerA CI pipeline fails with `deployments.apps "api" is forbidden: User "system:serviceaccount:ci:deployer" cannot patch resource "deployments" in API group "apps" in the namespace "prod"`.BeginnerA user can `get pods` but `kubectl logs` fails with `cannot get resource "pods/log"` and `kubectl exec` fails with `cannot create resource "pods/exec"`.BeginnerCreating a RoleBinding fails with `is attempting to grant RBAC permissions not currently held`.IntermediateEvery `kubectl apply` fails with `Internal error occurred: failed calling webhook "validate.kyverno.svc-fail": failed to call webhook: Post "https://kyverno-svc.kyverno.svc:443/validate/fail?timeout=10s": context deadline exceeded`.AdvancedCreating a Certificate fails with `failed calling webhook "webhook.cert-manager.io": ... no endpoints available for service "cert-manager-webhook"`.Intermediate