Skip to content
_CORE
AI & Agentic Systems Core Information Systems Cloud & Platform Engineering Data Platform & Integration Security & Compliance QA, Testing & Observability IoT, Automation & Robotics Mobile & Digital Banking & Finance Insurance Public Administration Defense & Security Healthcare Energy & Utilities Telco & Media Manufacturing Logistics & E-commerce Retail & Loyalty
References Technologies Blog Know-how Tools
About Collaboration Careers
CS EN DE
Let's talk

Kubernetes CRDs — Custom Resource Definitions

08. 06. 2020 Updated: 24. 03. 2026 1 min read intermediate
This article was published in 2020. Some information may be outdated.

Cloud Intermediate

Kubernetes CRDs — Custom Resource Definitions

KubernetesCRDAPIExtensibility 5 min read

Extending the Kubernetes API with custom resource types. CRD definitions, validation, versioning and best practices.

What Are CRDs

Custom Resource Definitions extend the Kubernetes API with custom object types.

apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
  name: databases.example.com
spec:
  group: example.com
  versions:
    - name: v1
      served: true
      storage: true
      schema:
        openAPIV3Schema:
          type: object
          properties:
            spec:
              type: object
              required: [engine, version]
              properties:
                engine:
                  type: string
                  enum: [postgres, mysql, mongodb]
                version:
                  type: string
                replicas:
                  type: integer
                  minimum: 1
                  maximum: 7
                  default: 3
  scope: Namespaced
  names:
    plural: databases
    singular: database
    kind: Database
    shortNames: [db]

Using a Custom Resource

apiVersion: example.com/v1
kind: Database
metadata:
  name: orders-db
  namespace: production
spec:
  engine: postgres
  version: "16"
  replicas: 3

# kubectl get databases
# kubectl describe db orders-db

Versioning

CRDs support multiple versions with a conversion webhook.

versions:
  - name: v1
    served: true
    storage: true
  - name: v1beta1
    served: true
    storage: false
conversion:
  strategy: Webhook
  webhook:
    conversionReviewVersions: ["v1"]
    clientConfig:
      service:
        name: db-conversion
        namespace: system
        path: /convert

Summary

CRDs are the foundation of Kubernetes extensibility. They enable declarative management of any infrastructure via kubectl and the standard K8s API.

Need Help with Implementation?

Our team has experience designing and implementing modern architectures. We’re happy to help.

Free Consultation

Share:

CORE SYSTEMS team

We build core systems and AI agents that keep operations running. 15 years of experience with enterprise IT.