KServe
This page describes how to deploy NVIDIA NIM for LLMs on KServe in a Kubernetes environment.
Prerequisites
Before deploying NIM on KServe, make sure you have the following:
- A Kubernetes cluster with KServe enabled and GPU-capable nodes
- Configured
kubectlaccess to the target cluster - An NGC API key for pulling NIM container images and downloading model artifacts
- A storage class that supports persistent volumes for model caching
If your Kubernetes cluster is provisioned with NVIDIA Cloud Native Stack (CNS), refer to Enable KServe on CNS. For other environments, refer to the KServe quickstart environment guide.
Create Common Resources
Create the same credentials and cache PVC that a Helm deployment uses.
-
Set the NGC API key in your shell:
-
Create the image pull secret:
-
Create the NGC API key secret:
-
Create the cache PVC manifest:
-
Apply the cache PVC manifest:
Set storageClassName to a StorageClass that is available in your Kubernetes cluster.
Adjust the PVC storage value based on your model size and expected cache usage.
Deploy NIM on KServe
Complete the following steps to deploy the minimal KServe example:
-
Create
kserve-nim.yamlwith aClusterServingRuntimeand anInferenceService: -
Apply the manifest:
This manifest is intentionally minimal and works as a starting point in most clusters.
Enable LoRA on KServe
Optional: Use the same LoRA setup from Enable LoRA with Helm to create the LoRA PVC and populate /loras with adapter files.
-
Update runtime settings in
kserve-nim.yaml: -
Reapply the manifest:
Verify Deployment
Verify that the InferenceService and pod are ready.
-
Check the
InferenceServicestatus: -
Check that the pod is running:
-
Review detailed
InferenceServicestatus and recent events:
A successful rollout shows the InferenceService in a ready state.