Kubernetes v1.36: Declarative Validation Reaches General Availability
Kubernetes version 1.36 marks a significant milestone with the General Availability (GA) of Declarative Validation for native types. This update transitions API validation from thousands of lines of error-prone, handwritten Go code to a unified, declarative framework using Interface Definition Language (IDL) tags. The primary motivation was to eliminate technical debt, ensure consistency across resources, and make API rules transparent and programmatically discoverable. Central to this change is the new 'validation-gen' code generator, which parses '+k8s:' marker tags in type definitions to automatically produce validation logic. This approach supports various constraints, including presence, basic limits, collections, unions, and immutability. For users, the shift promises more reliable and predictable APIs, while enabling future integration with OpenAPI specifications and ecosystem tools like Kubebuilder. For developers and contributors, it simplifies maintenance by replacing boilerplate code with an extensible system. This release represents a major structural improvement in how Kubernetes manages API integrity, reducing manual effort and enhancing the overall developer experience within the cloud-native ecosystem.
Wire timeline
Kubernetes v1.36: Declarative Validation Reaches General Availability
Kubernetes version 1.36 marks a significant milestone with the General Availability (GA) of Declarative Validation for native types. This update transitions API validation from thousands of lines of error-prone, handwritten Go code to a unified, declarative framework using Interface Definition Language (IDL) tags. The primary motivation was to eliminate technical debt, ensure consistency across resources, and make API rules transparent and programmatically discoverable. Central to this change is the new 'validation-gen' code generator, which parses '+k8s:' marker tags in type definitions to automatically produce validation logic. This approach supports various constraints, including presence, basic limits, collections, unions, and immutability. For users, the shift promises more reliable and predictable APIs, while enabling future integration with OpenAPI specifications and ecosystem tools like Kubebuilder. For developers and contributors, it simplifies maintenance by replacing boilerplate code with an extensible system. This release represents a major structural improvement in how Kubernetes manages API integrity, reducing manual effort and enhancing the overall developer experience within the cloud-native ecosystem.
Kubernetes Blog