apiextensions.k8s.io/v1
·CustomResourceDefinition
CustomResourceDefinition represents a resource that should be exposed on the API server. Its name MUST be in the format <.spec.name>.<.spec.group>.
Click on Property Name to show the description, and Pink Types to expand schema.
Required properties are marked with *
Change History
Kubernetes v1.36
Kubernetes v1.35
2 properties have been added on this version
- .status.conditions.observedGeneration
- .status.observedGeneration
Kubernetes v1.34
Kubernetes v1.33
Kubernetes v1.32
1 property has changed the description
- .spec.versions.schema.openAPIV3Schema.format
Kubernetes v1.31
1 property has changed the description
- .spec.versions.schema.openAPIV3Schema.x-kubernetes-validations
Kubernetes v1.30
1 property has been added on this version
- .spec.versions.selectableFields
Kubernetes v1.29
1 property has been added on this version
- .spec.versions.schema.openAPIV3Schema.x-kubernetes-validations.optionalOldSelf
1 property has changed the description
- .spec.versions.schema.openAPIV3Schema.x-kubernetes-validations.rule
Kubernetes v1.28
2 properties have been added on this version
- .spec.versions.schema.openAPIV3Schema.x-kubernetes-validations.fieldPath
- .spec.versions.schema.openAPIV3Schema.x-kubernetes-validations.reason
Kubernetes v1.27
1 property has been added on this version
- .spec.versions.schema.openAPIV3Schema.x-kubernetes-validations.messageExpression
9 properties have changed the description
- .metadata.annotations
- .metadata.labels
- .metadata.name
- .metadata.namespace
- .metadata.ownerReferences.name
- .metadata.ownerReferences.uid
- .metadata.uid
- .spec.conversion.strategy
- .spec.conversion.webhook
Kubernetes v1.26
1 property has changed the description
- .spec.preserveUnknownFields
Kubernetes v1.25
1 property has been removed on this version
- .metadata.clusterName
Kubernetes v1.24
5 properties have changed the description
- .metadata.clusterName
- .metadata.generateName
- .metadata.managedFields.time
- .metadata.ownerReferences.blockOwnerDeletion
- .metadata.selfLink
Kubernetes v1.23
1 property has been added on this version
- .spec.versions.schema.openAPIV3Schema.x-kubernetes-validations
Kubernetes v1.22
1 property has been added on this version
- .metadata.managedFields.subresource
1 property has changed the description
- .metadata
Kubernetes v1.21
Kubernetes v1.20
Kubernetes v1.19
2 properties have been added on this version
- .spec.versions.deprecated
- .spec.versions.deprecationWarning
1 property has changed the description
- .metadata.namespace
Kubernetes v1.18
1 property has changed the description
- .spec.versions.schema.openAPIV3Schema.x-kubernetes-list-map-keys
Kubernetes v1.17
1 property has been added on this version
- .spec.versions.schema.openAPIV3Schema.x-kubernetes-map-type
4 properties have changed the description
- .metadata.finalizers
- .spec.scope
- .spec.versions.schema.openAPIV3Schema.format
- .spec.versions.schema.openAPIV3Schema.x-kubernetes-list-type
Kubernetes v1.16
CustomResourceDefinition was first seen on this version of Kubernetes
Kubernetes v1.15
Kubernetes v1.14
Kubernetes v1.13
Kubernetes v1.12
Kubernetes v1.11
Examples
There are 2 examples of CustomResourceDefinition that you can use as a starting point to create your own.
- apiVersion: apiextensions.k8s.io/v1kind: CustomResourceDefinitionmetadata:# name must match the spec fields below, and be in the form: <plural>.<group>name: crontabs.stable.example.comspec:# group name to use for REST API: /apis/<group>/<version>group: stable.example.com# list of versions supported by this CustomResourceDefinitionversions:- name: v1# Each version can be enabled/disabled by Served flag.served: true# One and only one version must be marked as the storage version.storage: trueschema:openAPIV3Schema:type: objectproperties:spec:type: objectproperties:cronSpec:type: stringimage:type: stringreplicas:type: integer# either Namespaced or Clusterscope: Namespacednames:# plural name to be used in the URL: /apis/<group>/<version>/<plural>plural: crontabs# singular name to be used as an alias on the CLI and for displaysingular: crontab# kind is normally the CamelCased singular type. Your resource manifests use this.kind: CronTab# shortNames allow shorter string to match your resource on the CLIshortNames:- ct
apiVersion: apiextensions.k8s.io/v1kind: CustomResourceDefinitionmetadata: # name must match the spec fields below, and be in the form: <plural>.<group> name: crontabs.example.comspec: # group name to use for REST API: /apis/<group>/<version> group: example.com # list of versions supported by this CustomResourceDefinition versions: - name: v1beta1 # Each version can be enabled/disabled by Served flag. served: true # One and only one version must be marked as the storage version. storage: true # A schema is required schema: openAPIV3Schema: type: object properties: host: type: string port: type: string - name: v1 served: true storage: false schema: openAPIV3Schema: type: object properties: host: type: string port: type: string # The conversion section is introduced in Kubernetes 1.13+ with a default value of # None conversion (strategy sub-field set to None). conversion: # None conversion assumes the same schema for all versions and only sets the apiVersion # field of custom resources to the proper value strategy: None # either Namespaced or Cluster scope: Namespaced names: # plural name to be used in the URL: /apis/<group>/<version>/<plural> plural: crontabs # singular name to be used as an alias on the CLI and for display singular: crontab # kind is normally the CamelCased singular type. Your resource manifests use this. kind: CronTab # shortNames allow shorter string to match your resource on the CLI shortNames: - ct