`kubectl apply` of a large CRD or ConfigMap fails with `metadata.annotations: Too long: must have at most 262144 bytes`.
IntermediateTroubleshootingControl plane, RBAC, webhooks and autoscaling
Answer
Likely causes → Client-side apply stores the full object in the kubectl.kubernetes.io/last-applied-configuration annotation, which is limited to 256 KiB. Big CRDs (Prometheus Operator, Argo) exceed it.
Diagnose →
wc -c crd.yaml
Fix →
kubectl apply --server-side -f crd.yaml
Server-side apply uses managed fields, not the annotation. Objects themselves are still limited to about 1.5 MiB by etcd request size.
Prevent → Use server-side apply for CRDs in pipelines (Argo CD ServerSideApply=true sync option).
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