Jump to content

Connect Leeroopedia MCP: Equip your AI agents to search best practices, build plans, verify code, diagnose failures, and look up hyperparameter defaults.

Implementation:Kserve Kserve LLMIsvc Controller

From Leeroopedia
Knowledge Sources
Domains Kubernetes, Operator_Pattern, LLM_Serving
Last Updated 2026-02-13 00:00 GMT

Overview

Concrete Go controller entry point that registers the LLMISVCReconciler, webhooks, and API conversion handlers.

Description

The LLMIsvc controller is a standalone binary at cmd/llmisvc/main.go. It registers the LLMISVCReconciler, validation webhooks for v1alpha1 and v1alpha2, LLMInferenceServiceConfig webhooks, and conversion webhooks for API version conversion. The cache selector filters resources by the app.kubernetes.io/part-of: llminferenceservice label.

Usage

This binary is deployed as a Deployment in the kserve namespace by the LLMIsvc Helm chart. It runs independently of the main KServe controller manager.

Code Reference

Source Location

  • Repository: kserve
  • File: cmd/llmisvc/main.go, Lines 99-262

Signature

// LLMISVCReconciler reconciles LLMInferenceService resources
// Registered at main.go:L202-212
type LLMISVCReconciler struct {
    Client        client.Client
    Clientset     kubernetes.Interface
    EventRecorder record.EventRecorder
    Validator     *webhook.Validator
}

// Webhooks registered:
// L186-190: v1alpha2.LLMInferenceServiceValidator
// L193-197: v1alpha1.LLMInferenceServiceValidator
// L214-221: v1alpha1.LLMInferenceServiceConfigValidator
// L223-230: v1alpha2.LLMInferenceServiceConfigValidator
// L234-246: Conversion webhooks (v1alpha1 ↔ v1alpha2)

// Cache selector: app.kubernetes.io/part-of: llminferenceservice
// Leader election ID: llminferenceservice-kserve-controller-manager

Import

import "github.com/kserve/kserve/cmd/llmisvc"
// This is a standalone binary entry point

I/O Contract

Inputs

Name Type Required Description
LLMInferenceService events Watch events Yes Create/update/delete triggers
LLMInferenceServiceConfig ConfigMap Yes Pod templates and scheduler config

Outputs

Name Type Description
vLLM Pods Pods/Deployment Model serving containers
InferencePool CRD Endpoint pool for Gateway inference extension
HTTPRoute CRD Gateway API route to model endpoint
Scheduler Deployment Endpoint picker pod
Status LLMInferenceServiceStatus Ready conditions and endpoint URL

Usage Examples

Verify Controller Running

# Check controller pod
kubectl get pods -n kserve -l control-plane=llminferenceservice-kserve-controller-manager

# Check CRDs registered
kubectl get crd llminferenceservices.serving.kserve.io
kubectl get crd llminferenceserviceconfigs.serving.kserve.io

# Check leader election
kubectl get lease llminferenceservice-kserve-controller-manager -n kserve

Related Pages

Implements Principle

Requires Environment

Page Connections

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