Jump to content

Connect Leeroopedia MCP: Equip your AI agents to search best practices, build plans, verify code, diagnose failures, and look up hyperparameter defaults.

Heuristic:Kserve Kserve Server Side Apply For CRDs

From Leeroopedia
Knowledge Sources
Domains Operations, Debugging
Last Updated 2026-02-13 14:00 GMT

Overview

Use `kubectl apply --server-side=true` when CRD annotations exceed the 262144-byte metadata limit.

Description

KServe's CRDs (especially the full variants with validation schemas) can generate annotations that exceed Kubernetes' 262144-byte metadata annotation limit. This is a known issue with complex CRDs that include comprehensive OpenAPI validation schemas. Server-side apply bypasses this limitation by not storing the last-applied-configuration annotation.

Usage

Use this heuristic when installing or upgrading KServe CRDs and encountering annotation size errors.

The Insight (Rule of Thumb)

  • Action: Use `kubectl apply --server-side=true` instead of plain `kubectl apply` for KServe CRD installation.
  • Value: Eliminates the 262144-byte annotation limit issue.
  • Trade-off: Server-side apply uses a different field management strategy. Field conflicts may need `--force-conflicts` flag when switching from client-side to server-side apply.

Reasoning

Client-side `kubectl apply` stores the entire manifest in the `kubectl.kubernetes.io/last-applied-configuration` annotation for three-way merge. For large CRDs like `serving.kserve.io_llminferenceservices.yaml` (40,000+ lines), this annotation alone exceeds the 262,144-byte limit.

Evidence from `docs/COMMON_ISSUES_AND_SOLUTIONS.md`:

metadata.annotations: Too long: must have at most 262144 bytes.

Solution: kubectl apply --server-side=true -k ./config/default

Related Pages

Page Connections

Double-click a node to navigate. Hold to expand connections.
Principle
Implementation
Heuristic
Environment