⎈ k8s knowledge compiler

CustomResourceDefinition [page]deterministic

CustomResourceDefinition represents a resource that should be exposed on the API server. Its name MUST be in the format <.spec.name>.<.spec.group>.

reference

`apiVersion: apiextensions.k8s.io/v1`

`import "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1"`

## CustomResourceDefinition {#CustomResourceDefinition}

CustomResourceDefinition represents a resource that should be exposed on the API server. Its name MUST be in the format <.spec.name>.<.spec.group>.

<hr>

<table> <thead><tr><th>Field</th><th>Description</th></tr></thead> <tbody> <tr> <td><code>apiVersion</code><br/><em>string</em></td> <td>APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources</td> </tr> <tr> <td><code>kind</code><br/><em>string</em></td> <td>Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds</td> </tr> <tr> <td><code>metadata</code><br/><em><a href="">ObjectMeta</a></em></td> <td>Standard object's metadata More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata</td> </tr> <tr> <td><code>spec</code>&nbsp;<strong>*</strong><br/><em><a href="">CustomResourceDefinitionSpec</a></em></td> <td>spec describes how the user wants the resources to appear</td> </tr> <tr> <td><code>status</code><br/><em><a href="">CustomResourceDefinitionStatus</a></em></td> <td>status indicates the actual state of the CustomResourceDefinition</td> </tr> </tbody> </table>

## CustomResourceDefinitionSpec {#CustomResourceDefinitionSpec}

CustomResourceDefinitionSpec describes how a user wants their resource to appear

<hr>

<table> <thead><tr><th>Field</th><th>Description</th></tr></thead> <tbody> <tr> <td><code>conversion</code><br/><em><a href="">CustomResourceConversion</a></em></td> <td>conversion defines conversion settings for the CRD.</td> </tr> <tr> <td><code>group</code>&nbsp;<strong>*</strong><br/><em>string</em></td> <td>group is the API group of the defined custom resource. The custom resources are served under `/apis/\<group>/...`. Must match the name of the CustomResourceDefinition (in the form `\<names.plural>.\<group>`).</td> </tr> <tr> <td><code>names</code>&nbsp;<strong>*</strong><br/><em><a href="">CustomResourceDefinitionNames</a></em></td> <td>names specify the resource and kind names for the custom resource.</td> </tr> <tr> <td><code>preserveUnknownFields</code><br/><em>boolean</em></td> <td>preserveUnknownFields indicates that object fields which are not specified in the OpenAPI schema should be preserved when persisting to storage. apiVersion, kind, metadata and known fields inside metadata are always preserved. This field is deprecated in favor of setting `x-preserve-unknown-fields` to true in `spec.versions[*].schema.openAPIV3Schema`. See https://kubernetes.io/docs/tasks/extend-kubernetes/custom-resources/custom-resource-definitions/#field-pruning for details.</td> </tr> <tr> <td><code>scope</code>&nbsp;<strong>*</strong><br/><em>string</em></td> <td>scope indicates whether the defined custom resource is cluster- or namespace-scoped. Allowed values are `Cluster` and `Namespaced`.</td> </tr> <tr> <td><code>versions</code>&nbsp;<strong>*</strong><br/><em><a href="">CustomResourceDefinitionVersion array</a></em></td> <td>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 "kub …(trimmed)

Sources

reference/kubernetes-api/apiextensions/custom-resource-definition-v1.md · docCustomResourceDefinition

Related (25)

part_of JSON {#JSON}describes conf=1
part_of JSONSchemaProps {#JSONSchemaProps}describes conf=1
part_of SelectableField {#SelectableField}describes conf=1
part_of ServiceReference {#ServiceReference}describes conf=1
part_of ValidationRule {#ValidationRule}describes conf=1
part_of WebhookClientConfig {#WebhookClientConfig}describes conf=1
part_of WebhookConversion {#WebhookConversion}describes conf=1
part_of Operations {#Operations}describes conf=1
part_of `post` Createdescribes conf=1

← all Docs