Inferensys

Glossary

Custom Resource Definition (CRD)

A Custom Resource Definition (CRD) is a Kubernetes extension mechanism that allows users to define their own resource types and objects, which can then be managed by the Kubernetes API server and controlled by custom controllers.
Stylish WeWork-like workspace with hot desks and document wall, professional searching through enterprise knowledge base on a mounted ultrawide display, warm industrial pendants overhead.
KUBERNETES EXTENSION

What is a Custom Resource Definition (CRD)?

A Custom Resource Definition (CRD) is the primary extension mechanism in Kubernetes, allowing users to define new resource types and objects that are managed natively by the Kubernetes API server.

A Custom Resource Definition (CRD) is a Kubernetes API extension that lets you define your own resource types and objects, which the Kubernetes API server then manages alongside built-in resources like Pods and Deployments. By declaring a CRD's schema—its API group, version, and kind—you introduce a new custom resource (CR) that can be created, read, updated, and deleted using standard kubectl commands. This mechanism is foundational for the Operator Pattern, enabling the automation of domain-specific operational knowledge.

For Edge AI Orchestration, CRDs are critical for modeling complex, stateful edge workloads. You can define resources like EdgeModel, InferenceSession, or DeviceFleet to declaratively manage the lifecycle of AI models across distributed hardware. A corresponding custom controller implements the control loop, observing these custom resources and executing reconciliation logic to deploy models, manage device configurations, and report status, thereby extending Kubernetes' native orchestration capabilities to the unique demands of edge computing.

KUBERNETES EXTENSION

Key Components of a CRD

A Custom Resource Definition (CRD) extends the Kubernetes API by defining a new resource type. Its core components specify the resource's schema, API endpoints, and versioning strategy.

01

API Group and Version

The API group (apiVersion field) categorizes related resources, like inferensys.com/v1alpha1. The version (v1alpha1, v1beta1, v1) indicates the stability and maturity of the CRD's schema. Multiple versions can be served simultaneously, with an internal storage version and a mechanism for conversion between them.

02

Kind and Plural

The Kind (e.g., EdgeInferenceJob) is the CamelCase type name used in YAML manifests. The plural name (e.g., edgeinferencejobs) forms the RESTful API endpoint path (/apis/inferensys.com/v1alpha1/edgeinferencejobs). These identifiers must be unique within the API group.

03

Schema (OpenAPI v3)

The schema is a structural blueprint defined using OpenAPI v3.0 validation. It specifies:

  • Required and optional fields.
  • Data types (string, integer, object).
  • Default values and allowed enums.
  • Nested object structures. This schema enables the Kubernetes API server to validate the spec and status of all custom resource instances, preventing malformed configurations.
04

Scope: Namespaced vs. Cluster

Defines the resource's visibility and isolation.

  • Namespaced: The resource exists within a namespace (e.g., prod, dev), enabling multi-tenancy and access control via RBAC. Most application-level CRDs are namespaced.
  • Cluster: The resource is cluster-wide, like a Node or PersistentVolume. Used for global infrastructure or cluster configuration objects.
05

Subresources: Status & Scale

Optional subresources enable advanced lifecycle management.

  • /status: A writable subresource allowing a custom controller to update the resource's status independently of its spec, following the controller pattern for state reconciliation.
  • /scale: Allows the resource to be managed by the Horizontal Pod Autoscaler (HPA), enabling automatic scaling based on custom metrics.
06

The Custom Controller

While not part of the CRD YAML itself, a custom controller is the essential runtime component. It is a control loop that watches for events (Create, Update, Delete) on the custom resource and executes domain-specific logic to reconcile the actual system state with the desired state declared in the resource's spec. This implements the Operator Pattern.

KUBERNETES EXTENSION

How CRDs Work in Edge AI Orchestration

A Custom Resource Definition (CRD) is the fundamental Kubernetes extension mechanism that enables the platform to manage custom objects, forming the backbone of sophisticated Edge AI orchestration systems.

A Custom Resource Definition (CRD) is a Kubernetes API extension that allows users to define their own resource types and objects, which can then be managed by the Kubernetes API server and controlled by custom controllers. In Edge AI, a CRD might define a resource like EdgeModel or InferencePipeline, encapsulating the desired state for an AI workload—such as the model version, hardware acceleration requirements, and data preprocessing steps—across a distributed fleet.

The Operator Pattern leverages CRDs to encode domain-specific operational knowledge for Edge AI. A custom controller watches for changes to these custom resources and executes state reconciliation loops to drive the actual state of edge devices—like deploying a quantized model to a Jetson device or scaling inference replicas based on sensor input—toward the declared desired state, automating complex lifecycle management without cloud dependency.

EXTENSION PATTERNS

Common CRD Examples in Cloud-Native Ecosystems

Custom Resource Definitions (CRDs) enable the Kubernetes API to be extended for managing any type of declarative resource. Below are canonical examples of CRDs used to automate complex, stateful applications and infrastructure.

KUBERNETES EXTENSIBILITY

Frequently Asked Questions

Custom Resource Definitions (CRDs) are the fundamental extension mechanism of Kubernetes, enabling users to define their own API objects and resource types. This FAQ addresses common questions for CTOs and Platform Engineers orchestrating AI workloads at the edge.

A Custom Resource Definition (CRD) is a Kubernetes API extension mechanism that allows users to define new, custom resource types and objects, which are then managed by the Kubernetes API server and controlled by custom controllers. It works by extending the Kubernetes API with a new schema that defines the structure (the spec and status fields) of the custom object. Once a CRD is applied, the API server provides a dedicated RESTful endpoint (e.g., /apis/your-group/v1/namespaces/default/yourresources) for creating, reading, updating, and deleting instances of that custom resource. The actual business logic for these resources is implemented in a separate custom controller, which runs a reconciliation loop to watch for changes to the custom objects and take actions to drive the cluster's actual state toward the desired state declared in the object's spec.

Prasad Kumkar

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.