Configuration Example
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
name: backups.stable.linux.com
spec:
group: stable.linux.com
version: v1
scope: Namespaced
names:
plural: backups
singular: backup
shortNames:
- bks
kind: BackUpLearn more about each field in the example above.
Explanation of Configuration Fiels
apiVersion
This should match the current level of stability, which is apiextensions.k8s.io/v1.
kind: CustomResourceDefinition
The object type being inserted by the kube-apiserver.
name: backups.stable.linux.com
The name must match the spec field declared later. The syntax must be <plural name>.<group>.
group: stable.linux.com
The group name will become part of the REST API under /apis/<group>/<version> or /apis/stable/v1 in this case with the version set to v1.
scope
Determines if the object exists in a single namespace or is cluster-wide.
plural
Defines the last part of the API URL, such as apis/stable/v1/backups.
singular and shortNames
They represent the name displayed and make CLI usage easier.
kind
A CamelCased singular type used in resource manifests.
Last updated