Jump to content

Connect SuperML | Leeroopedia MCP: Equip your AI agents with best practices, code verification, and debugging knowledge. Powered by Leeroo — building Organizational Superintelligence. Contact us at founders@leeroo.com.

Implementation:Kserve Kserve LocalModelNodeGroup CRD

From Leeroopedia
Knowledge Sources
Domains Kubernetes, CRD, Local Model Storage
Last Updated 2026-02-13 00:00 GMT

Overview

Concrete CRD definition for the LocalModelNodeGroup custom resource in the KServe serving API.

Description

This file contains the full CustomResourceDefinition for the LocalModelNodeGroup kind, produced by controller-gen v0.19.0. It belongs to the serving.kserve.io API group at version v1alpha1 and is a cluster-scoped resource. The CRD defines node groups with shared PersistentVolumeClaim and PersistentVolume specifications for local model storage, allowing cluster administrators to configure storage provisioning policies for nodes that host pre-cached ML models.

Usage

Apply this CRD during KServe installation to register the LocalModelNodeGroup API with the Kubernetes API server. Cluster administrators then create LocalModelNodeGroup resources to define groups of nodes with specific storage configurations for caching models locally, improving inference startup time by avoiding remote model downloads.

Code Reference

Source Location

Signature

apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
  annotations:
    controller-gen.kubebuilder.io/version: v0.19.0
  name: localmodelnodegroups.serving.kserve.io
spec:
  group: serving.kserve.io
  names:
    kind: LocalModelNodeGroup
    listKind: LocalModelNodeGroupList
    plural: localmodelnodegroups
    singular: localmodelnodegroup
  scope: Cluster
  versions:
    - name: v1alpha1

Import

kubectl apply -f config/crd/full/localmodel/serving.kserve.io_localmodelnodegroups.yaml

I/O Contract

Inputs

Name Type Required Description
apiVersion string Yes Must be serving.kserve.io/v1alpha1
kind string Yes Must be LocalModelNodeGroup
metadata ObjectMeta Yes Standard Kubernetes object metadata (no namespace since cluster-scoped)
spec LocalModelNodeGroupSpec Yes Storage configuration for the node group

Key spec fields:

Field Type Required Description
spec.persistentVolumeClaimSpec PersistentVolumeClaimSpec Yes PVC specification defining access modes, storage class, volume mode, data sources, resource requests/limits, and selectors for local model storage
spec.persistentVolumeSpec PersistentVolumeSpec Yes PV specification defining the backing storage volume with support for various volume types (AWS EBS, Azure Disk, GCE PD, NFS, CSI, etc.)
spec.storageLimit Quantity Yes Maximum storage capacity allocated for local model caching on nodes in this group

Outputs

Name Type Description
status.available Quantity Amount of storage currently available in the node group
status.used Quantity Amount of storage currently consumed by cached models in the node group

Usage Examples

Create a LocalModelNodeGroup

apiVersion: serving.kserve.io/v1alpha1
kind: LocalModelNodeGroup
metadata:
  name: gpu-nodes-storage
spec:
  persistentVolumeClaimSpec:
    accessModes:
      - ReadWriteOnce
    storageClassName: local-ssd
    resources:
      requests:
        storage: 500Gi
  persistentVolumeSpec:
    accessModes:
      - ReadWriteOnce
    capacity:
      storage: 500Gi
    hostPath:
      path: /mnt/model-cache
  storageLimit: 500Gi

Related Pages

  • New principle needed: Kserve_Kserve_LocalModelNodeGroup_Specification

Page Connections

Double-click a node to navigate. Hold to expand connections.
Principle
Implementation
Heuristic
Environment