kubernetes v1.31

CustomResourceDefinitionSpec.versions

versions is the list of all API versions of the defined custom resource. Version names are used to compute the order in which served versions are listed in API discovery. If the version string is "kube-like", it will sort above non "kube-like" version strings, which are ordered lexicographically. "Kube-like" versions start with a "v", then are followed by a number (the major version), then optionally the string "alpha" or "beta" and another number (the minor version). These are sorted first by GA > beta > alpha (where GA is a version with no suffix such as beta or alpha), and then by comparing major version, then minor version. An example sorted list of versions: v10, v2, v1, v11beta2, v10beta3, v3beta1, v12alpha1, v11alpha2, foo1, foo10.

9 fields
CustomResourceDefinitionSpec.versions fields and descriptions
Field / TypeDescription
CustomResourceColumnDefinition[]

additionalPrinterColumns specifies additional columns returned in Table output. See https://kubernetes.io/docs/reference/using-api/api-concepts/#receiving-resources-as-tables for details. If no columns are specified, a single column displaying the age of the custom resource is used.

  • x-kubernetes-list-type: "atomic"
deprecated
boolean

deprecated indicates this version of the custom resource API is deprecated. When set to true, API requests to this version receive a warning header in the server response. Defaults to false.

deprecationWarning
string

deprecationWarning overrides the default warning returned to API clients. May only be set when `deprecated` is true. The default warning indicates this version is deprecated and recommends use of the newest served version of equal or greater stability, if one exists.

name
string required

name is the version name, e.g. “v1”, “v2beta1”, etc. The custom resources are served under this version at `/apis/<group>/<version>/...` if `served` is true.

CustomResourceValidation

schema describes the schema used for validation, pruning, and defaulting of this version of the custom resource.

SelectableField[]

selectableFields specifies paths to fields that may be used as field selectors. A maximum of 8 selectable fields are allowed. See https://kubernetes.io/docs/concepts/overview/working-with-objects/field-selectors

  • x-kubernetes-list-type: "atomic"
served
boolean required

served is a flag enabling/disabling this version from being served via REST APIs

storage
boolean required

storage indicates this version should be used when persisting custom resources to storage. There must be exactly one version with storage=true.

CustomResourceSubresources

subresources specify what subresources this version of the defined custom resource have.