vllm-stack

by vllm production 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

  1. A running Kubernetes cluster with GPU. (You can set it up through minikube: https://minikube.sigs.k8s.io/docs/tutorials/nvidia/)
  2. 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

FieldTypeDefaultDescription
servingEngineSpec.enableEnginebooleantrueWhether to enable the serving engine deployment
servingEngineSpec.labelsmap{environment: "test", release: "test"}Customized labels for the serving engine deployment
servingEngineSpec.vllmApiKeystring/mapnull(Optional) API key for securing vLLM models. Can be a direct string or an object referencing an existing secret
servingEngineSpec.modelSpeclist[]Array of specifications for configuring multiple serving engine deployments running different models
servingEngineSpec.containerPortinteger8000Port the vLLM server container is listening on
servingEngineSpec.servicePortinteger80Port the service will listen on
servingEngineSpec.configsmap{}Set other environment variables from a config map
servingEngineSpec.strategymap{}Deployment strategy for the serving engine pods
servingEngineSpec.tolerationslist[]Tolerations configuration for the serving engine pods (when there are taints on nodes)
servingEngineSpec.runtimeClassNamestring"nvidia"RuntimeClassName configuration (set to "nvidia" if using GPU)
servingEngineSpec.schedulerNamestring""SchedulerName configuration for the serving engine pods
servingEngineSpec.securityContextmap{}Pod-level security context configuration for the serving engine pods
servingEngineSpec.containerSecurityContextmap{runAsNonRoot: false}Container-level security context configuration for the serving engine container
servingEngineSpec.extraPortslist[]List of additional ports to expose for the serving engine container
servingEngineSpec.startupProbe.initialDelaySecondsinteger15Number of seconds after container starts before startup probe is initiated
servingEngineSpec.startupProbe.periodSecondsinteger10How often (in seconds) to perform the startup probe
servingEngineSpec.startupProbe.failureThresholdinteger60Number of failures before considering failed
servingEngineSpec.startupProbe.httpGet.pathstring"/health"Path to access on the HTTP server
servingEngineSpec.startupProbe.httpGet.portinteger8000Port to access on the container
servingEngineSpec.livenessProbe.initialDelaySecondsinteger15Number of seconds after container starts before liveness probe is initiated
servingEngineSpec.livenessProbe.periodSecondsinteger10How often (in seconds) to perform the liveness probe
servingEngineSpec.livenessProbe.failureThresholdinteger3Number of failures before considering failed
servingEngineSpec.livenessProbe.httpGet.pathstring"/health"Path to access on the HTTP server
servingEngineSpec.livenessProbe.httpGet.portinteger8000Port to access on the container
servingEngineSpec.imagePullPolicystring"Always"Image pull policy for serving engine
servingEngineSpec.extraVolumeslist[]Extra volumes for serving engine
servingEngineSpec.extraVolumeMountslist[]Extra volume mounts for serving engine
servingEngineSpec.envlist[](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

FieldTypeDefaultDescription
servingEngineSpec.modelSpec[].annotationsmap{}(Optional) Annotations to add to the deployment, e.g., {model: "opt125m"}
servingEngineSpec.modelSpec[].podAnnotationsmap{}(Optional) Annotations to add to the pod, e.g., {model: "opt125m"}
servingEngineSpec.modelSpec[].labelsmap{}(Optional) Additional labels to add to the deployment
servingEngineSpec.modelSpec[].podLabelsmap{}(Optional) Additional labels to add to the pods
servingEngineSpec.modelSpec[].namestring""The name of the model, e.g., "example-model"
servingEngineSpec.modelSpec[].repositorystring""The repository of the model, e.g., "vllm/vllm-openai"
servingEngineSpec.modelSpec[].tagstring""The tag of the model, e.g., "latest"
servingEngineSpec.modelSpec[].imagePullSecretstring""(Optional) Name of secret with credentials to private container repository
servingEngineSpec.modelSpec[].modelURLstring""The URL of the model, e.g., "facebook/opt-125m"
servingEngineSpec.modelSpec[].chatTemplatestringnull(Optional) Chat template (Jinja2) specifying tokenizer configuration
servingEngineSpec.modelSpec[].replicaCountinteger1The number of replicas for the model
servingEngineSpec.modelSpec[].pdb.enabledbooleanfalseWhether to create a PodDisruptionBudget for the model
servingEngineSpec.modelSpec[].pdb.labelsmap{}Labels to add to the PodDisruptionBudget
servingEngineSpec.modelSpec[].pdb.annotationsmap{}Annotations to add to the PodDisruptionBudget
servingEngineSpec.modelSpec[].pdb.minAvailablestring""Number of pods that are available after eviction as number or percentage (eg.: 50%)
servingEngineSpec.modelSpec[].pdb.maxUnavailablestring""Number of pods that are unavailable after eviction as number or percentage (eg.: 50%).
servingEngineSpec.modelSpec[].resourcesobject{}Standard Kubernetes resources block (requests/limits). If specified, this takes priority over and ignores simplified resource fields (requestCPU, requestMemory, requestGPU, etc.)
servingEngineSpec.modelSpec[].requestCPUinteger0The number of CPUs requested for the model
servingEngineSpec.modelSpec[].requestMemorystring""The amount of memory requested for the model, e.g., "16Gi"
servingEngineSpec.modelSpec[].requestGPUinteger0The number of GPUs requested for the model
servingEngineSpec.modelSpec[].requestGPUTypestring"nvidia.com/gpu"(Optional) The type of GPU requested, e.g., "nvidia.com/mig-4g.71gb"
servingEngineSpec.modelSpec[].limitCPUstring""(Optional) The CPU limit for the model, e.g., "8"
servingEngineSpec.modelSpec[].limitMemorystring""(Optional) The memory limit for the model, e.g., "32Gi"
servingEngineSpec.modelSpec[].shmSizestring"20Gi"Size of the shared memory for the serving engine container (applied when tensor parallelism is enabled)
servingEngineSpec.modelSpec[].enableLoRAbooleantrue(Optional) Whether to enable LoRA
servingEngineSpec.modelSpec[].pvcStoragestring""(Optional) The amount of storage requested for the model, e.g., "50Gi"
servingEngineSpec.modelSpec[].pvcAccessModelist[](Optional) The access mode policy for the mounted volume, e.g., ["ReadWriteOnce"]
servingEngineSpec.modelSpec[].storageClassstring""(Optional) The storage class of the PVC
servingEngineSpec.modelSpec[].pvcMatchLabelsmap{}(Optional) The labels to match the PVC, e.g., {model: "opt125m"}
servingEngineSpec.modelSpec[].pvcLabelsmap{}(Optional) The labels to add to the PVC, e.g., {label_excluded_from_alerts: "true"}
servingEngineSpec.modelSpec[].pvcAnnotationsmap{}(Optional) The annotations to add to the PVC
servingEngineSpec.modelSpec[].extraVolumeslist[](Optional) Additional volumes to add to the pod, in Kubernetes volume format
servingEngineSpec.modelSpec[].extraVolumeMountslist[](Optional) Additional volume mounts to add to the container, in Kubernetes volumeMount format
servingEngineSpec.modelSpec[].extraContainerslist[](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[].serviceAccountNamestring""(Optional) The name of the service account to use for the deployment
servingEngineSpec.modelSpec[].serviceAnnotationsmap{}(Optional) Annotations to add to the model's service
servingEngineSpec.modelSpec[].serviceLabelsmap{}(Optional) Labels to add to the model's service
servingEngineSpec.modelSpec[].priorityClassNamestring""Priority class name for the deployment
servingEngineSpec.modelSpec[].hf_tokenstring/map-(Optional) Hugging Face token configuration
servingEngineSpec.modelSpec[].envlist-(Optional) Environment variables for the container
servingEngineSpec.modelSpec[].nodeNamestring-(Optional) Direct node assignment
servingEngineSpec.modelSpec[].nodeSelectorTermslist-(Optional) Node selector terms
servingEngineSpec.modelSpec[].tolerationslist-(Optional) Per-model tolerations. Merged with or replaces servingEngineSpec.tolerations according to tolerationsPolicy
servingEngineSpec.modelSpec[].tolerationsPolicystring"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

FieldTypeDefaultDescription
servingEngineSpec.modelSpec[].initContainer.namestring""The name of the init container, e.g., "init"
servingEngineSpec.modelSpec[].initContainer.imagestring""The Docker image for the init container, e.g., "busybox:latest"
servingEngineSpec.modelSpec[].initContainer.commandlist[](Optional) The command to run in the init container, e.g., ["sh", "-c"]
servingEngineSpec.modelSpec[].initContainer.argslist[](Optional) Additional arguments to pass to the command, e.g., ["ls"]
servingEngineSpec.modelSpec[].initContainer.envlist[](Optional) List of environment variables to set in the container
servingEngineSpec.modelSpec[].initContainer.resourcesmap{}(Optional) The resource requests and limits for the container
servingEngineSpec.modelSpec[].initContainer.mountPvcStoragebooleanfalse(Optional) Whether to mount the model's volume

vLLM Configuration

FieldTypeDefaultDescription
servingEngineSpec.modelSpec[].vllmConfig.v0integer-Specify to 1 to use vLLM v0, otherwise vLLM v1
servingEngineSpec.modelSpec[].vllmConfig.enablePrefixCachingbooleanfalseEnable prefix caching
servingEngineSpec.modelSpec[].vllmConfig.enableChunkedPrefillbooleanfalseEnable chunked prefill
servingEngineSpec.modelSpec[].vllmConfig.maxModelLeninteger4096The maximum model length, e.g., 16384
servingEngineSpec.modelSpec[].vllmConfig.dtypestring"fp16"The data type, e.g., "bfloat16"
servingEngineSpec.modelSpec[].vllmConfig.tensorParallelSizeinteger1The degree of tensor parallelism, e.g., 2
servingEngineSpec.modelSpec[].vllmConfig.maxNumSeqsinteger256Maximum number of sequences to be processed in a single iteration
servingEngineSpec.modelSpec[].vllmConfig.maxLorasinteger0The maximum number of LoRA models to be loaded in a single batch
servingEngineSpec.modelSpec[].vllmConfig.gpuMemoryUtilizationnumber0.9The fraction of GPU memory to be used for the model executor (0-1)
servingEngineSpec.modelSpec[].vllmConfig.runnerstring""The runner type for the model, can be "auto" or "pooling"
servingEngineSpec.modelSpec[].vllmConfig.convertstring""The conversion type for the model, can be "token_embed", "embed", "token_classify", "classify", or "score"
servingEngineSpec.modelSpec[].vllmConfig.extraArgslist["--trust-remote-code"]Extra command line arguments to pass to vLLM

LMCache Configuration

FieldTypeDefaultDescription
servingEngineSpec.modelSpec[].lmcacheConfig.enabledbooleanfalseEnable 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.

  1. Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
  2. Place the chartvllm-stack is pinned at v0.1.14 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
  3. 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