Skip to main content

Configuration_Example

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: BackUp

Explanation of Configuration Fields

apiVersion: This should match the current level of stability, which is apiextensions.k8s.io/v1.

kind: The object type being inserted by the kube-apiserver.

name: The name must match the spec field declared later. The syntax must be <plural name>.<group>.

group: 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/shotNames: They represent the name displayed and make CLI usage easier.

kind: A CamelCased singular type used in resource manifests.