Implementation:Kserve Kserve LocalModelNode CRD
| Knowledge Sources | |
|---|---|
| Domains | Kubernetes, Model Caching |
| Last Updated | 2026-02-13 00:00 GMT |
Overview
Concrete CustomResourceDefinition for the LocalModelNode resource provided by the KServe project.
Description
This file defines the full CRD for the LocalModelNode custom resource, which tracks the state of model downloads on individual cluster nodes. It is a cluster-scoped v1alpha1 resource with a spec listing localModels (each having modelName and sourceModelUri), and a status containing per-model download states. This CRD provides per-node visibility into model download progress, enabling the local model controller to coordinate and monitor model caching across the cluster.
Usage
Apply this CRD to a Kubernetes cluster as part of the local model caching subsystem setup. LocalModelNode resources are typically managed by the LocalModel controller rather than created directly by users. Each LocalModelNode instance represents the model download state on a specific cluster node.
Code Reference
Source Location
- Repository: Kserve_Kserve
- File: config/crd/full/localmodel/serving.kserve.io_localmodelnodes.yaml
- Lines: 1-61
Signature
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.19.0
name: localmodelnodes.serving.kserve.io
spec:
group: serving.kserve.io
names:
kind: LocalModelNode
listKind: LocalModelNodeList
plural: localmodelnodes
singular: localmodelnode
scope: Cluster
versions:
- name: v1alpha1
schema:
openAPIV3Schema:
properties:
spec:
properties:
localModels:
items:
properties:
modelName:
type: string
sourceModelUri:
type: string
required:
- modelName
- sourceModelUri
required:
- localModels
status:
properties:
modelStatus:
additionalProperties:
enum:
- ""
- ModelDownloadPending
- ModelDownloading
- ModelDownloaded
- ModelDownloadError
Import
kubectl apply -f config/crd/full/localmodel/serving.kserve.io_localmodelnodes.yaml
I/O Contract
Inputs
| Name | Type | Required | Description |
|---|---|---|---|
| spec.localModels | array of objects | Yes | List of models to be cached on this node |
| spec.localModels[].modelName | string | Yes | The name identifier of the model |
| spec.localModels[].sourceModelUri | string | Yes | The URI from which to download the model |
Outputs
| Name | Type | Description |
|---|---|---|
| LocalModelNode CRD | CustomResourceDefinition | Registers the LocalModelNode resource type in the Kubernetes API server |
| status.modelStatus | map of string | Per-model download status on this node (ModelDownloadPending, ModelDownloading, ModelDownloaded, ModelDownloadError) |
Usage Examples
Apply the CRD
kubectl apply -f config/crd/full/localmodel/serving.kserve.io_localmodelnodes.yaml
Inspect LocalModelNode status
kubectl get localmodelnodes -o wide