# Kubernetes v1.36: Declarative Validation Graduates to GA

DevFeed: [Kubernetes v1.36: Declarative Validation Graduates to GA](<https://devfeed.tech/articles/kubernetes-v1-36-declarative-validation-graduates-to-ga-4546.md>)

Original publisher: [Read original article](<https://kubernetes.io/blog/2026/05/05/kubernetes-v1-36-declarative-validation-ga/>)

Author: Yongrui Lin

Published: 2026-05-05T18:35:00Z

Content type: article

Language: en

Sources: [Kubernetes Blog](<https://devfeed.tech/sources/kubernetes-blog.md>)

Topics: [Kubernetes](<https://devfeed.tech/topics/kubernetes.md>), [API](<https://devfeed.tech/topics/api.md>), [Code](<https://devfeed.tech/topics/code.md>), [Go Language](<https://devfeed.tech/topics/go-language.md>), [Boilerplate](<https://devfeed.tech/topics/boilerplate.md>), [OpenAPI Specification](<https://devfeed.tech/topics/openapi.md>), [migration](<https://devfeed.tech/topics/migration.md>), [Tooling](<https://devfeed.tech/topics/tooling.md>)

Tags: [api](<https://devfeed.tech/tags/api.md>), [apis](<https://devfeed.tech/tags/apis.md>), [code](<https://devfeed.tech/tags/code.md>), [contributors](<https://devfeed.tech/tags/contributors.md>), [developers](<https://devfeed.tech/tags/developers.md>), [ecosystem](<https://devfeed.tech/tags/ecosystem.md>), [errors](<https://devfeed.tech/tags/errors.md>), [feature](<https://devfeed.tech/tags/feature.md>), [framework](<https://devfeed.tech/tags/framework.md>), [go](<https://devfeed.tech/tags/go.md>), [kubernetes](<https://devfeed.tech/tags/kubernetes.md>), [migration](<https://devfeed.tech/tags/migration.md>), [openapi](<https://devfeed.tech/tags/openapi.md>), [release](<https://devfeed.tech/tags/release.md>), [tooling](<https://devfeed.tech/tags/tooling.md>), [v1](<https://devfeed.tech/tags/v1.md>), [validation](<https://devfeed.tech/tags/validation.md>)

## AI overview

Kubernetes v1.36 makes declarative validation for Kubernetes native types generally available. The article explains how marker tags and generated Go validation functions replace extensive handwritten validation code, improving maintainability, consistency, API discoverability, and integration with OpenAPI and ecosystem tooling.

## Source excerpt

In Kubernetes v1.36, Declarative Validation for Kubernetes native types has reached General Availability (GA). For users, this means more reliable, predictable, and better-documented APIs. By moving to a declarative model, the project also unlocks the future ability to publish validation rules via OpenAPI and integrate with ecosystem tools like Kubebuilder. For contributors and ecosystem developers, this replaces thousands of lines of handwritten validation code with a unified, maintainable framework. This post covers why this migration was necessary, how the declarative validation framework works, and what new capabilities come with this GA release. The Motivation: Escaping the "Handwritten" Technical Debt For years, the validation of Kubernetes native APIs relied almost entirely on handwritten Go code. If a field needed to be bounded by a minimum value, or if two fields needed to be mutually exclusive, developers had to write explicit Go functions to enforce those constraints. As the Kubernetes API surface expanded, this approach led to several systemic issues: Technical Debt: The project accumulated roughly 18,000 lines of boilerplate validation code. This code was difficult to maintain, error-prone, and required intense scrutiny during code reviews. Inconsistency: Without a centralized framework, validation rules were sometimes applied inconsistently across different resources. Opaque APIs: Handwritten validation logic was difficult to discover or analyze programmatically. This meant clients and tooling couldn't predictably know validation rules without consulting the source code or encountering errors at runtime. The solution proposed by SIG API Machinery was Declarative Validation: using Interface Definition Language (IDL) tags (specifically +k8s: marker tags) directly within types.go files to define validation rules. Enter validation-gen At the core of the declarative validation feature is a new code generator called validation-gen. Just as Kubernetes uses ge