kubectl apply -f my-resource-crd.yaml To follow the g/co/crd/setup pattern, you could wrap this in a script or Makefile:
Try building a simple controller (e.g., with Kubebuilder) that reacts to your new CRD. Have questions about CRD setup? Drop a comment below or reach out to our team. g/co/crd/setup
apiVersion: stable.example.com/v1 kind: DatabaseBackup metadata: name: nightly-backup spec: backupSchedule: "0 2 * * *" retentionDays: 7 Apply it: kubectl apply -f my-resource-crd
Now go ahead, create your first custom resource, and extend your cluster’s API with confidence. apiVersion: stable
kubectl get crd | grep databasebackups kubectl explain databasebackup You should see your new resource type available. Now that the CRD exists, create an instance of your custom resource ( my-backup.yaml ):
April 14, 2026 Reading time: 5 minutes Introduction If you’ve been working with Kubernetes for a while, you’ve likely heard about Custom Resource Definitions (CRDs). They allow you to extend Kubernetes’ API and create your own resource types, just like pods or services.
Double-check the schema section in your CRD — the structure must match exactly.