← English news
Priority 4/5

Kubernetes v1.36 Stabilizes Declarative Validation for Native Types as Feature Reaches General Availability

Kubernetes v1.36 promotes Declarative Validation to General Availability, allowing developers to define complex validation rules directly within the API schema using Common Expression Language.

The graduation of Declarative Validation to General Availability in Kubernetes v1.36 marks a significant shift in how native resource types are validated. By utilizing Common Expression Language, developers can now define complex validation rules directly within the API schema rather than relying on external webhooks or hardcoded controller logic. This transition ensures that validation rules are consistently applied and easier for users to discover through standard tooling. For platform engineers and cluster operators, this GA status signifies that the feature is ready for production environments with long-term support. The move to a declarative model reduces the operational overhead of managing custom admission controllers while increasing the overall reliability of the API server. By centralizing validation within the schema, Kubernetes provides a more transparent and predictable experience for developers interacting with core resources. Operators should review their current validation strategies to determine where declarative rules can replace legacy imperative methods. While existing deployments remain functional, leveraging these new capabilities can simplify configuration management and improve the speed of request processing. The project maintainers have emphasized that this graduation also paves the way for future enhancements in how Kubernetes handles resource constraints across diverse environments.

Primary source

Open Kubernetes Blog ↗

This article summarizes the source. Check the original for full details and conditions.

Comparison

AspectBefore / AlternativeAfter / This
Validation LocationExternal admission webhooks or controller codeEmbedded directly in the API schema via CEL
DiscoverabilityValidation logic hidden in backend implementationTransparent rules visible in OpenAPI documentation
Operational OverheadHigh maintenance for custom webhook servicesLow overhead using native built-in validation
ConsistencyPossible discrepancies between different API versionsUnified validation enforced across all environments

Action Checklist

  1. Audit existing Custom Resource Definitions for validation logic candidates Identify logic currently handled by admission webhooks
  2. Transition imperative validation rules to CEL-based declarative rules Ensure the Common Expression Language syntax matches your requirements
  3. Verify API documentation updates in the OpenAPI schema Check that validation constraints are correctly reflected for end users
  4. Test resource creation failures with invalid parameters Confirm that declarative rules trigger the expected error messages
  5. Review Kubernetes v1.36 release notes for deprecation notices Check for any legacy validation methods being phased out