A Custom Resource Definition (CRD) is a Kubernetes API extension that allows users to define and manage new types of resources, called Custom Resources, which behave identically to native Kubernetes objects like Pods or Deployments. By declaring a CRD's schema via a YAML manifest, you instruct the Kubernetes API server to create a new RESTful endpoint for your custom resource, enabling standard kubectl commands for its lifecycle management. This mechanism is foundational for building Kubernetes Operators and extending the platform's declarative model to manage any application or infrastructure component.
Glossary
Custom Resource Definition (CRD)

What is Custom Resource Definition (CRD)?
A Custom Resource Definition (CRD) is the fundamental Kubernetes extension mechanism for defining new resource types.
CRDs are essential for Infrastructure as Code (IaC) and parallelized simulation infrastructure, where they model complex, domain-specific entities like simulation jobs or robotic training tasks. A Custom Resource is an instance of a CRD, storing its state in etcd. A corresponding custom controller monitors these resources and executes control loops to reconcile the actual system state with the desired state declared in the resource's spec. This pattern encapsulates operational knowledge, enabling the automation of sophisticated workflows within the cluster's native orchestration framework.
Key Components of a CRD
A Custom Resource Definition (CRD) is a Kubernetes extension mechanism that allows users to create and manage new types of resources, called Custom Resources, which behave like native Kubernetes objects (like Pods or Deployments). The CRD itself is a schema that defines the structure of these new resources.
apiVersion and kind
These are the mandatory, top-level fields that identify the resource type in the Kubernetes API.
- apiVersion: Specifies the API group and version for the CRD (e.g.,
inferensys.com/v1alpha1). - kind: The singular, CamelCase name of the Custom Resource (e.g.,
ParallelSimulation). Together, they allow the Kubernetes API server to route and process requests for your custom objects.
metadata
This section contains identifying information about the specific instance of the Custom Resource, following the same pattern as native Kubernetes objects.
- name: The unique identifier for this resource instance within its namespace.
- namespace: The Kubernetes namespace where the resource is deployed (if namespaced).
- labels and annotations: Key-value pairs for organizing, selecting, and attaching arbitrary metadata to the object.
spec (Specification)
The spec is the required, user-defined configuration for the desired state of the Custom Resource. It is the most critical component, defined by the schema in the CRD.
- Example: For a
ParallelSimulationCR, thespecmight define fields likereplicaCount: 1000,physicsEngine: "NVIDIA Isaac Sim", andtrainingAlgorithm. The controller watches this section to reconcile the actual system state with this declared intent.
status
The status is an optional, read-only section populated by the custom controller to report the actual observed state of the system.
- It contains information like
phase: "Running",completedReplicas: 850, andlastError: "". - Users and other controllers query the
statusto understand the current condition of the resource without inspecting the underlying pods or services directly. It should never be modified by the user.
The CRD Schema (OpenAPI v3)
The CRD contains a formal OpenAPI v3 schema that defines the structure, data types, validation rules, and defaults for the spec and status fields.
- Validation: Enforces that user-provided
specvalues are correct (e.g.,replicaCountmust be an integer > 0). - Documentation: Serves as inline API documentation for the Custom Resource.
- Tooling Compatibility: Enables IDE autocompletion and
kubectlexplain functionality (kubectl explain parallelsimulation.spec.replicaCount).
Scope (Namespaced vs. Cluster)
A fundamental property defined in the CRD that determines the resource's visibility and isolation.
- Namespaced: The Custom Resource exists within a specific namespace (e.g.,
training-sim-west). This is typical for workload-like resources. - Cluster-Scoped: The Custom Resource is visible across the entire cluster (e.g., a
ClusterSimulationPolicy). This is used for cluster-wide configuration. The scope cannot be changed after the CRD is created.
How Does a Custom Resource Definition Work?
A Custom Resource Definition (CRD) is the fundamental Kubernetes API extension that allows users to define and manage new types of resources, called Custom Resources, which behave like native Kubernetes objects such as Pods or Deployments.
A Custom Resource Definition (CRD) is a Kubernetes API extension that defines a new, custom resource type and its schema. When applied to a cluster, it instructs the Kubernetes API server to create a new RESTful endpoint for managing instances of that resource, called Custom Resources. This mechanism allows users to extend the Kubernetes API with domain-specific objects that integrate seamlessly with native tools like kubectl and the cluster's control plane, enabling the declarative management of complex applications and infrastructure.
The power of a CRD is realized when paired with a custom controller implementing the Operator Pattern. This controller is a control loop that watches for changes to Custom Resource objects and takes action to reconcile the actual state of the system with the desired state declared in the resource's spec. This automates operational knowledge, such as deploying an application, scaling a database, or managing a complex simulation workload, by encoding human expertise into software that runs inside the Kubernetes cluster itself.
Common Use Cases for CRDs
Custom Resource Definitions (CRDs) are the fundamental building block for extending the Kubernetes API. They enable users to define and manage new types of resources that behave like native Kubernetes objects. This section details the primary patterns for leveraging CRDs in modern infrastructure and application management.
Defining Application-Specific Objects
CRDs allow teams to model their own domain concepts as first-class Kubernetes resources. This is the core use case for encapsulating complex application configurations.
- Examples: Defining a
Databaseresource with fields for engine, version, storage size, and backup schedules, or aModelDeploymentresource specifying framework, GPU requirements, and scaling policies. - Benefit: This creates a declarative API that integrates seamlessly with Kubernetes tooling (
kubectl, GitOps, RBAC). Operators and controllers can then watch these custom objects and execute the necessary logic to reconcile the actual state with the declared state.
Implementing the Operator Pattern
CRDs are the declarative component of the Operator Pattern, which packages human operational knowledge into software. A custom controller watches the CRD instances and takes action.
- How it works: A user creates a YAML for a custom resource (e.g.,
etcdCluster). The custom controller detects this new object and automatically provisions pods, configures networking, and handles backups or failover. - Real-world use: The Prometheus Operator defines a
ServiceMonitorCRD to declaratively manage how Prometheus discovers targets. The Cert-Manager usesCertificateandIssuerCRDs to automate TLS certificate lifecycle management.
Orchestrating Complex Workflows & Pipelines
CRDs provide a structured way to define and manage multi-step processes, such as CI/CD pipelines, data processing jobs, or ML training runs, as Kubernetes-native objects.
- Key Example: The Argo Workflows project defines a
WorkflowCRD. Each step in a pipeline becomes a Kubernetes Pod, and the workflow engine manages dependencies and execution order. - Advantage: This leverages Kubernetes' scheduling, resilience, and observability for workflow steps. Users can
kubectl get workflowsto see status, and logs are aggregated through standard Kubernetes mechanisms.
Managing External Services & Cloud Resources
CRDs enable the Kubernetes-native management of external infrastructure through controllers that act as a bridge to cloud provider APIs (AWS, GCP, Azure).
- Mechanism: A controller watches for CRDs like
S3BucketorPostgreSQLInstance. When one is created, the controller calls the respective cloud API to provision the resource and updates the CRD's status field. - Crossplane: This project is built entirely on this concept, using Composite Resource Definitions (XRDs)—an advanced form of CRD—to define and compose cloud infrastructure. It allows declaring a full application stack (cluster, database, cache) using Kubernetes YAML.
Standardizing Internal Platform Configuration
Platform engineering teams use CRDs to create self-service abstractions for developers, hiding the complexity of underlying infrastructure.
- Internal Platform as a Product: Teams can define CRDs for
FeatureFlag,CanaryRelease, orQuotathat enforce organizational policies and best practices. - Governance: Platform controllers can validate these resources, ensure compliance, and automatically generate the necessary underlying Kubernetes primitives (Deployments, ConfigMaps, NetworkPolicies). This provides a consistent, auditable interface for application teams.
Extending Service Mesh & Networking Rules
Service meshes like Istio and Linkerd heavily utilize CRDs to allow users to declaratively manage traffic routing, security policies, and observability settings.
- Istio's API: It defines CRDs such as
VirtualService(for routing rules),DestinationRule(for load balancing policies), andAuthorizationPolicy(for access control). - Impact: Network operators can apply these resources using
kubectl apply, and the Istio control plane dynamically reconfigures the data plane (Envoy proxies) without requiring manual intervention or application redeployment. This decouples traffic management from application code.
Frequently Asked Questions
A Custom Resource Definition (CRD) is the fundamental Kubernetes extension mechanism for creating new API objects. This FAQ clarifies its purpose, mechanics, and role in modern infrastructure.
A Custom Resource Definition (CRD) is a Kubernetes API extension mechanism that allows users to define and introduce new types of resources, called Custom Resources, which behave like native Kubernetes objects such as Pods or Deployments. It works by extending the Kubernetes API server with a new schema that defines the structure (the CRD) and a controller that implements the business logic to reconcile the actual state of the system with the desired state declared in the Custom Resource. When you apply a CRD manifest, the API server creates a new RESTful endpoint (e.g., /apis/yourcompany.com/v1/yourresources). You can then create instances of your Custom Resource using YAML or JSON, and your controller watches for changes to those objects to take action.
Example CRD for a 'Database' resource:
yamlapiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: name: databases.yourcompany.com spec: group: yourcompany.com versions: - name: v1 served: true storage: true schema: openAPIV3Schema: type: object properties: spec: type: object properties: engine: type: string version: type: string scope: Namespaced names: plural: databases singular: database kind: Database
Enabling Efficiency, Speed & Accuracy
Intelligent Analysis, Decision & Execution
We build AI systems for teams that need search across company data, workflow automation across tools, or AI features inside products and internal software.
Talk to Us
Search across company data
Give teams answers from docs, tickets, runbooks, and product data with sources and permissions.
Useful when people spend too long searching or get different answers from different systems.

Automate internal workflows
Use AI to route work, draft outputs, trigger actions, and keep approvals and logs in place.
Useful when repetitive work moves across multiple tools and teams.

Add AI to products and internal tools
Build assistants, guided actions, or decision support into the software your team or customers already use.
Useful when AI needs to be part of the product, not a separate tool.
Related Terms
Custom Resource Definitions (CRDs) are a core Kubernetes extension mechanism. The following terms define the surrounding ecosystem and patterns for building custom controllers and declarative APIs.

About the author
Prasad Kumkar
CEO & MD, Inference Systems
Prasad Kumkar is the CEO & MD of Inference Systems and writes about AI systems architecture, LLM infrastructure, model serving, evaluation, and production deployment. Over 5+ years, he has worked across computer vision models, L5 autonomous vehicle systems, and LLM research, with a focus on taking complex AI ideas into real-world engineering systems.
His work and writing cover AI systems, large language models, AI agents, multimodal systems, autonomous systems, inference optimization, RAG, evaluation, and production AI engineering.
Partnered with leading AI, data, and software stack.
How We Work
Custom AI workflows for your Business
One-fit-all AI don't work for modern businesses. At Inferensys, we aim to understand your business & custom requirements; which we use to define most efficient agentic workflows, the data, and the tools for your business.
01
Review the use case
We understand the task, the users, and where AI can actually help.
Read more02
Pick the right approach
We define what needs search, automation, or product integration.
Read more03
Build the first useful version
We implement the part that proves the value first.
Read more04
Improve from there
We add the checks and visibility needed to keep it useful.
Read moreThe first call is a practical review of your use case and the right next step.
Talk to Us