KServe

Also known as: KFServing

On this page 8

KServe is an open source, Kubernetes-native model serving platform that turns a trained model artifact into a scalable, versioned network endpoint through a single declarative resource called the InferenceService. In MLOps & deployment, it occupies the serving stage of the lifecycle: it sits after the model registry and the training pipeline, and before monitoring and drift detection.

The project began in 2019 as KFServing inside Kubeflow, with contributions from Google, IBM, Bloomberg, NVIDIA and Seldon, and was renamed KServe in 2021 when it became an independent project. Its central promise is that data scientists describe what to serve while the platform handles autoscaling, routing, canary rollouts and protocol standardization on Kubernetes.

How KServe turns a model into an endpoint

KServe works as a Kubernetes operator: a controller watches custom resource definitions and reconciles them into deployments, services, autoscalers and routes. A user submits an InferenceService manifest that names the model format and a storage URI, and the controller selects a matching runtime, creates the pods and exposes an HTTP and gRPC endpoint.

Before the model server starts, a storage initializer container downloads the artifact from object storage such as S3, Google Cloud Storage or Azure Blob, from a persistent volume claim, or from an OCI image. This separation keeps the model artifact independent of the serving image, so a new model version usually requires only a changed URI, not a rebuilt container.

The following table lists the main resources that a KServe installation adds to a cluster and what each one controls.

ResourcePurposeTypical owner
InferenceServiceDeclares one served model with its componentsML engineer
ServingRuntimeDefines a model server image for a namespacePlatform team
ClusterServingRuntimeSame as ServingRuntime, shared cluster-widePlatform team
InferenceGraphChains several services into a pipelineML engineer
TrainedModelRegisters an extra model on a multi-model serverML engineer
Core KServe resources

Predictor, transformer and explainer components

An InferenceService is composed of up to three independently scaled components. The predictor is mandatory and runs the model itself. The optional transformer handles pre-processing and post-processing, such as tokenization, image resizing or feature lookups from a feature store like Feast. The optional explainer returns explanations alongside predictions.

Because each component runs in its own pods, a CPU-bound transformer can scale separately from a GPU-bound predictor. The price of this design is an extra network hop for every request that passes through a transformer, which typically adds a few milliseconds of latency inside the cluster.

Deployment modes and serving runtimes

KServe supports three deployment modes, and the choice determines the dependencies, the scaling behavior and the operational cost. The next table compares them.

ModeBuilt onScale to zeroBest fit
ServerlessKnative Serving and Istio or another ingressYesSpiky traffic, many low-volume models
Raw deploymentStandard Deployments and Horizontal Pod AutoscalerNo by defaultSteady traffic, simpler clusters, large LLMs
ModelMeshShared multi-model server podsNot per modelThousands of small models with high density
KServe deployment modes compared

In serverless mode, the Knative pod autoscaler scales on concurrent requests per pod rather than CPU utilization, which suits inference better. Scale to zero saves resources, but the first request after idling pays a cold start that can range from seconds for small models to several minutes for large GPU models.

Model servers are pluggable through serving runtimes. KServe ships runtime definitions for widely used servers, and teams can register custom ones.

RuntimeModel formatsNotes
NVIDIA TritonTensorRT, ONNX, PyTorch, TensorFlowHigh GPU throughput, dynamic batching
MLServerscikit-learn, XGBoost, LightGBMImplements the Open Inference Protocol
Hugging Face runtimeTransformer models, LLMsCan use a vLLM backend for generation
TorchServePyTorchNative PyTorch handlers
TensorFlow ServingTensorFlow SavedModelMature, gRPC-oriented
Common serving runtimes used with KServe

The Open Inference Protocol and traffic management

KServe standardizes the request format through the Open Inference Protocol, also known as the V2 protocol, which defines REST and gRPC endpoints for health, metadata and inference with typed tensors. A client written against this protocol can call Triton, MLServer or a custom server without changing request code. The older V1 protocol remains available for simple JSON payloads, and recent releases add OpenAI-compatible endpoints for generative models.

For safe releases, the canaryTrafficPercent field splits traffic between the last ready revision and a new one. Setting it to 10 sends about one request in ten to the candidate model; promotion means removing the field, and rollback means setting it to zero. This supports model promotion and champion-challenger patterns, although true shadow deployment requires an InferenceGraph or an external mesh configuration.

KServe is one of several options for model serving, and the right choice depends on how much Kubernetes ownership a team accepts. The table below places it among common alternatives in the same Topic.

OptionOperating modelMain strengthMain trade-off
KServeSelf-managed on KubernetesOpen standard, flexible runtimesRequires cluster expertise
Seldon CoreSelf-managed on KubernetesRich inference graphsLicensing changed for newer versions
BentoMLPython packaging plus optional cloudFast developer workflowLess Kubernetes-native control
Amazon SageMakerFully managed cloud serviceLittle infrastructure workVendor lock-in and cost at scale
NVIDIA NIMPrebuilt optimized containersTuned LLM performanceTied to NVIDIA hardware
KServe and neighboring serving approaches

In practice, KServe is often combined with the others rather than replacing them: a Kubeflow pipeline trains the model, a registry stores it, KServe serves it, and a tool such as Evidently AI watches for data drift in logged predictions.

Limitations and common mistakes

KServe reduces boilerplate but does not remove operational complexity. The most frequent problems come from the surrounding stack rather than from the model.

  • Underestimating dependencies: serverless mode needs Knative, an ingress gateway and cert-manager, each with its own upgrade cycle.
  • Ignoring cold starts: scale to zero on a multi-gigabyte LLM can create minutes of unavailability; set a minimum replica count for latency-sensitive services.
  • Skipping model warm-up: the first requests after startup may be slow until kernels and caches are initialized.
  • Treating serving as monitoring: KServe exposes Prometheus metrics and payload logging, but drift detection and observability need separate tooling.
  • Overusing transformers: heavy pre-processing in a transformer adds latency and can cause training-serving skew if it differs from training code.

The short version

A trained model is just a file. To be useful, it must answer requests from apps and websites. KServe is the software that does this job on Kubernetes, the system many companies use to run their servers.

Think of it as a restaurant manager. The chef is the model. The manager seats guests, adds tables when the room gets busy, and closes sections when it is quiet. The team only says which model to serve, and KServe handles the rest.

Where it makes a difference

A regional bank runs about 40 credit and fraud models on a shared Kubernetes cluster. Before adopting KServe, each model had a hand-written Flask service, its own Dockerfile and its own scaling rules, and a new version took about two weeks to reach production.

After migration, every model is an InferenceService that points to a versioned artifact in object storage and uses the MLServer runtime with the Open Inference Protocol. Rarely used reporting models run in serverless mode and scale to zero overnight, while the real-time fraud model keeps at least three replicas in raw deployment mode. New fraud models start at a 10 percent canary and are promoted after a week of stable metrics. The bank reports that release time fell to about two days, and rollback became a one-line change instead of an emergency redeployment.