KServe
Deploy NIM LLM and VLM on KServe in a Kubernetes cluster. Use this page to create pull credentials and a cache volume, apply a ClusterServingRuntime and InferenceService, and confirm that the service is ready.
Prerequisites
Before you start, complete the following prerequisites:
- Provision a Kubernetes cluster with KServe enabled and GPU-capable nodes.
- Configure
kubectlaccess to the target cluster. - Obtain an NGC API key for pulling NIM container images and downloading model artifacts.
- Identify 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 Credentials and Cache Storage
To create the same credentials and cache PVC that a Helm deployment uses, complete the following steps:
-
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
To deploy the minimal KServe example, complete the following steps:
-
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: To enable LoRA adapters on KServe, complete the following steps. 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 the Deployment
To verify that the InferenceService and pod are ready, complete the following steps:
-
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.
Next Steps
After the InferenceService is ready, continue with the following topics:
- Helm and Kubernetes for Helm-based Kubernetes deployment
- Enable LoRA with Helm for LoRA PVC layout and adapter files
- Run:ai to deploy NIM on Run:ai