Interview Prep/Kubernetes/Control plane, RBAC, webhooks and autoscaling

`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).

All Kubernetes questions Roadmap: Kubernetes networking, storage & scaling

More on Control plane, RBAC, webhooks and autoscaling