vllm-stack
Helm chartv0.1.14
The stack deployment of vLLM
About this chart
vLLM Production Stack helm chart
This helm chart lets users deploy multiple serving engines and a router into the Kubernetes cluster.
Key features
- Support running multiple serving engines with multiple different models
- Load the model weights directly from the existing PersistentVolumes
Prerequisites
- A running Kubernetes cluster with GPU. (You can set it up through
minikube: https://minikube.sigs.k8s.io/docs/tutorials/nvidia/) - Helm
Install the helm chart
helm dependency build
helm install llmstack . -f values-example.yaml
Uninstall the chart
helm uninstall llmstack
Configure the deployments
See helm/values.yaml for mode details.
Production Stack Helm Chart Values Reference
This table documents all available configuration values for the Production Stack Helm chart.
Table of Contents
- Serving Engine Configuration
- Router Configuration
- Cache Server Configuration
- LoRA Adapters Configuration
- LoRA Controller Configuration
- Shared Storage Configuration
- Other Configuration
Serving Engine Configuration
| Field | Type | Default | Description |
|---|---|---|---|
servingEngineSpec.enableEngine | boolean | true | Whether to enable the serving engine deployment |
servingEngineSpec.labels | map | {environment: "test", release: "test"} | Customized labels for the serving engine deployment |
servingEngineSpec.vllmApiKey | string/map | null | (Optional) API key for securing vLLM models. Can be a direct string or an object referencing an existing secret |
servingEngineSpec.modelSpec | list | [] | Array of specifications for configuring multiple serving engine deployments running different models |
servingEngineSpec.containerPort | integer | 8000 | Port the vLLM server container is listening on |
servingEngineSpec.servicePort | integer | 80 | Port the service will listen on |
servingEngineSpec.configs | map | {} | Set other environment variables from a config map |
servingEngineSpec.strategy | map | {} | Deployment strategy for the serving engine pods |
servingEngineSpec.tolerations | list | [] | Tolerations configuration for the serving engine pods (when there are taints on nodes) |
servingEngineSpec.runtimeClassName | string | "nvidia" | RuntimeClassName configuration (set to "nvidia" if using GPU) |
servingEngineSpec.schedulerName | string | "" | SchedulerName configuration for the serving engine pods |
servingEngineSpec.securityContext | map | {} | Pod-level security context configuration for the serving engine pods |
servingEngineSpec.containerSecurityContext | map | {runAsNonRoot: false} | Container-level security context configuration for the serving engine container |
servingEngineSpec.extraPorts | list | [] | List of additional ports to expose for the serving engine container |
servingEngineSpec.startupProbe.initialDelaySeconds | integer | 15 | Number of seconds after container starts before startup probe is initiated |
servingEngineSpec.startupProbe.periodSeconds | integer | 10 | How often (in seconds) to perform the startup probe |
servingEngineSpec.startupProbe.failureThreshold | integer | 60 | Number of failures before considering failed |
servingEngineSpec.startupProbe.httpGet.path | string | "/health" | Path to access on the HTTP server |
servingEngineSpec.startupProbe.httpGet.port | integer | 8000 | Port to access on the container |
servingEngineSpec.livenessProbe.initialDelaySeconds | integer | 15 | Number of seconds after container starts before liveness probe is initiated |
servingEngineSpec.livenessProbe.periodSeconds | integer | 10 | How often (in seconds) to perform the liveness probe |
servingEngineSpec.livenessProbe.failureThreshold | integer | 3 | Number of failures before considering failed |
servingEngineSpec.livenessProbe.httpGet.path | string | "/health" | Path to access on the HTTP server |
servingEngineSpec.livenessProbe.httpGet.port | integer | 8000 | Port to access on the container |
servingEngineSpec.imagePullPolicy | string | "Always" | Image pull policy for serving engine |
servingEngineSpec.extraVolumes | list | [] | Extra volumes for serving engine |
servingEngineSpec.extraVolumeMounts | list | [] | Extra volume mounts for serving engine |
servingEngineSpec.env | list | [] | (Optional) Global environment variables for all serving engine containers. If a variable is set in both servingEngineSpec.env and servingEngineSpec.modelSpec[].env, the value from modelSpec[].env will override the global value for that model. |
Model Specification Fields
| Field | Type | Default | Description |
|---|---|---|---|
servingEngineSpec.modelSpec[].annotations | map | {} | (Optional) Annotations to add to the deployment, e.g., {model: "opt125m"} |
servingEngineSpec.modelSpec[].podAnnotations | map | {} | (Optional) Annotations to add to the pod, e.g., {model: "opt125m"} |
servingEngineSpec.modelSpec[].labels | map | {} | (Optional) Additional labels to add to the deployment |
servingEngineSpec.modelSpec[].podLabels | map | {} | (Optional) Additional labels to add to the pods |
servingEngineSpec.modelSpec[].name | string | "" | The name of the model, e.g., "example-model" |
servingEngineSpec.modelSpec[].repository | string | "" | The repository of the model, e.g., "vllm/vllm-openai" |
servingEngineSpec.modelSpec[].tag | string | "" | The tag of the model, e.g., "latest" |
servingEngineSpec.modelSpec[].imagePullSecret | string | "" | (Optional) Name of secret with credentials to private container repository |
servingEngineSpec.modelSpec[].modelURL | string | "" | The URL of the model, e.g., "facebook/opt-125m" |
servingEngineSpec.modelSpec[].chatTemplate | string | null | (Optional) Chat template (Jinja2) specifying tokenizer configuration |
servingEngineSpec.modelSpec[].replicaCount | integer | 1 | The number of replicas for the model |
servingEngineSpec.modelSpec[].pdb.enabled | boolean | false | Whether to create a PodDisruptionBudget for the model |
servingEngineSpec.modelSpec[].pdb.labels | map | {} | Labels to add to the PodDisruptionBudget |
servingEngineSpec.modelSpec[].pdb.annotations | map | {} | Annotations to add to the PodDisruptionBudget |
servingEngineSpec.modelSpec[].pdb.minAvailable | string | "" | Number of pods that are available after eviction as number or percentage (eg.: 50%) |
servingEngineSpec.modelSpec[].pdb.maxUnavailable | string | "" | Number of pods that are unavailable after eviction as number or percentage (eg.: 50%). |
servingEngineSpec.modelSpec[].resources | object | {} | Standard Kubernetes resources block (requests/limits). If specified, this takes priority over and ignores simplified resource fields (requestCPU, requestMemory, requestGPU, etc.) |
servingEngineSpec.modelSpec[].requestCPU | integer | 0 | The number of CPUs requested for the model |
servingEngineSpec.modelSpec[].requestMemory | string | "" | The amount of memory requested for the model, e.g., "16Gi" |
servingEngineSpec.modelSpec[].requestGPU | integer | 0 | The number of GPUs requested for the model |
servingEngineSpec.modelSpec[].requestGPUType | string | "nvidia.com/gpu" | (Optional) The type of GPU requested, e.g., "nvidia.com/mig-4g.71gb" |
servingEngineSpec.modelSpec[].limitCPU | string | "" | (Optional) The CPU limit for the model, e.g., "8" |
servingEngineSpec.modelSpec[].limitMemory | string | "" | (Optional) The memory limit for the model, e.g., "32Gi" |
servingEngineSpec.modelSpec[].shmSize | string | "20Gi" | Size of the shared memory for the serving engine container (applied when tensor parallelism is enabled) |
servingEngineSpec.modelSpec[].enableLoRA | boolean | true | (Optional) Whether to enable LoRA |
servingEngineSpec.modelSpec[].pvcStorage | string | "" | (Optional) The amount of storage requested for the model, e.g., "50Gi" |
servingEngineSpec.modelSpec[].pvcAccessMode | list | [] | (Optional) The access mode policy for the mounted volume, e.g., ["ReadWriteOnce"] |
servingEngineSpec.modelSpec[].storageClass | string | "" | (Optional) The storage class of the PVC |
servingEngineSpec.modelSpec[].pvcMatchLabels | map | {} | (Optional) The labels to match the PVC, e.g., {model: "opt125m"} |
servingEngineSpec.modelSpec[].pvcLabels | map | {} | (Optional) The labels to add to the PVC, e.g., {label_excluded_from_alerts: "true"} |
servingEngineSpec.modelSpec[].pvcAnnotations | map | {} | (Optional) The annotations to add to the PVC |
servingEngineSpec.modelSpec[].extraVolumes | list | [] | (Optional) Additional volumes to add to the pod, in Kubernetes volume format |
servingEngineSpec.modelSpec[].extraVolumeMounts | list | [] | (Optional) Additional volume mounts to add to the container, in Kubernetes volumeMount format |
servingEngineSpec.modelSpec[].extraContainers | list | [] | (Optional) Additional containers to run alongside the main vLLM container, in Kubernetes container format. Unlike the LoRA sidecar, these are added regardless of enableLoRA and support the full container spec (image, args, env, volumeMounts, livenessProbe, resources, etc.) |
servingEngineSpec.modelSpec[].serviceAccountName | string | "" | (Optional) The name of the service account to use for the deployment |
servingEngineSpec.modelSpec[].serviceAnnotations | map | {} | (Optional) Annotations to add to the model's service |
servingEngineSpec.modelSpec[].serviceLabels | map | {} | (Optional) Labels to add to the model's service |
servingEngineSpec.modelSpec[].priorityClassName | string | "" | Priority class name for the deployment |
servingEngineSpec.modelSpec[].hf_token | string/map | - | (Optional) Hugging Face token configuration |
servingEngineSpec.modelSpec[].env | list | - | (Optional) Environment variables for the container |
servingEngineSpec.modelSpec[].nodeName | string | - | (Optional) Direct node assignment |
servingEngineSpec.modelSpec[].nodeSelectorTerms | list | - | (Optional) Node selector terms |
servingEngineSpec.modelSpec[].tolerations | list | - | (Optional) Per-model tolerations. Merged with or replaces servingEngineSpec.tolerations according to tolerationsPolicy |
servingEngineSpec.modelSpec[].tolerationsPolicy | string | "append" | (Optional) How per-model tolerations interact with global tolerations. "append" unions both lists; "override" replaces global tolerations entirely for this model |
Init Container Configuration
| Field | Type | Default | Description |
|---|---|---|---|
servingEngineSpec.modelSpec[].initContainer.name | string | "" | The name of the init container, e.g., "init" |
servingEngineSpec.modelSpec[].initContainer.image | string | "" | The Docker image for the init container, e.g., "busybox:latest" |
servingEngineSpec.modelSpec[].initContainer.command | list | [] | (Optional) The command to run in the init container, e.g., ["sh", "-c"] |
servingEngineSpec.modelSpec[].initContainer.args | list | [] | (Optional) Additional arguments to pass to the command, e.g., ["ls"] |
servingEngineSpec.modelSpec[].initContainer.env | list | [] | (Optional) List of environment variables to set in the container |
servingEngineSpec.modelSpec[].initContainer.resources | map | {} | (Optional) The resource requests and limits for the container |
servingEngineSpec.modelSpec[].initContainer.mountPvcStorage | boolean | false | (Optional) Whether to mount the model's volume |
vLLM Configuration
| Field | Type | Default | Description |
|---|---|---|---|
servingEngineSpec.modelSpec[].vllmConfig.v0 | integer | - | Specify to 1 to use vLLM v0, otherwise vLLM v1 |
servingEngineSpec.modelSpec[].vllmConfig.enablePrefixCaching | boolean | false | Enable prefix caching |
servingEngineSpec.modelSpec[].vllmConfig.enableChunkedPrefill | boolean | false | Enable chunked prefill |
servingEngineSpec.modelSpec[].vllmConfig.maxModelLen | integer | 4096 | The maximum model length, e.g., 16384 |
servingEngineSpec.modelSpec[].vllmConfig.dtype | string | "fp16" | The data type, e.g., "bfloat16" |
servingEngineSpec.modelSpec[].vllmConfig.tensorParallelSize | integer | 1 | The degree of tensor parallelism, e.g., 2 |
servingEngineSpec.modelSpec[].vllmConfig.maxNumSeqs | integer | 256 | Maximum number of sequences to be processed in a single iteration |
servingEngineSpec.modelSpec[].vllmConfig.maxLoras | integer | 0 | The maximum number of LoRA models to be loaded in a single batch |
servingEngineSpec.modelSpec[].vllmConfig.gpuMemoryUtilization | number | 0.9 | The fraction of GPU memory to be used for the model executor (0-1) |
servingEngineSpec.modelSpec[].vllmConfig.runner | string | "" | The runner type for the model, can be "auto" or "pooling" |
servingEngineSpec.modelSpec[].vllmConfig.convert | string | "" | The conversion type for the model, can be "token_embed", "embed", "token_classify", "classify", or "score" |
servingEngineSpec.modelSpec[].vllmConfig.extraArgs | list | ["--trust-remote-code"] | Extra command line arguments to pass to vLLM |
LMCache Configuration
| Field | Type | Default | Description |
|---|---|---|---|
servingEngineSpec.modelSpec[].lmcacheConfig.enabled | boolean | false | Enable LMCache |
| `servingEngineSpec |
Deploy vllm-stack with OpenTenant
Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has vllm-stack on a Hetzner server. Change the host, add apps from the marketplace, then copy the generated files. Providers and prices are samples, and nothing here is sent anywhere.
- Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
- Place the chartvllm-stack is pinned at v0.1.14 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
- ApplySave opentenant.yaml and main.tf from the console, then run the commands below.
# opentenant.yaml, main.tf and dns.tf come from the builder below opentenant validate opentenant.yaml terraform init && terraform apply