`kubectl apply` of the Prometheus CRDs fails with `metadata.annotations: Too long: must have at most 262144 bytes`
IntermediateTroubleshootingKubernetes monitoring and the Prometheus Operator
Answer
Likely causes → Client-side apply stores the full object in the last-applied-configuration annotation; the CRDs are too big.
Diagnose → The error text is clear.
Fix → Use kubectl apply --server-side --force-conflicts -f crds/ or kubectl replace/create.
Prevent → Use server-side apply for large CRDs in all pipelines.
More on Kubernetes monitoring and the Prometheus Operator
A new ServiceMonitor is not picked up by the Prometheus OperatorIntermediateServiceMonitor is selected but its targets don't appear on `/targets`IntermediateServiceMonitor target appears but Operator logs `skipping servicemonitor ... failed to get secret`AdvancedPodMonitor targets show `DOWN` with `connection refused` on port 8080 while the app listens on 9090BeginnerPrometheusRule created but rules don't show in PrometheusIntermediate`KubeletDown` / `TargetDown` alerts fire for kube-scheduler and kube-controller-manager on EKS/GKEBeginner