A controller logs `Operation cannot be fulfilled on deployments.apps "web": the object has been modified; please apply your changes to the latest version and try again`.
IntermediateTroubleshootingControl plane, RBAC, webhooks and autoscaling
Answer
Likely causes → Optimistic concurrency conflict: the client sent an update based on an older resourceVersion while someone else (HPA, another controller, a human) changed the object.
Diagnose →
kubectl get deploy web -o jsonpath='{.metadata.resourceVersion} {.metadata.managedFields[*].manager}{"\n"}'
Fix → Occasional conflicts are normal; clients should re-read and retry (retry.RetryOnConflict in client-go). Constant conflicts mean two actors fight over the same field: e.g. a pipeline setting replicas while an HPA manages it. Remove replicas from the manifest.
Prevent → One owner per field; use server-side apply so ownership is explicit.
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