Skip to content

Operator task guide

How to run vLLM on Kubernetes and Ray clusters reliably

Most Kubernetes vLLM failures are pod configuration mismatches rather than model bugs: missing /dev/shm memory-backed emptyDir volumes for tensor parallelism, aggressive liveness probes killing pods during slow weight downloads, or container memory limits triggering cgroup OOMKill while GPU VRAM is still free.

For multi-node models on Ray (KubeRay or standalone), validate Ray placement groups, pin identical container images across head and worker pods, and match --tensor-parallel-size to per-node GPUs with --pipeline-parallel-size across nodes.

Reviewed . Reference guidance is not a diagnosis of your workload.

Step-by-step method

  1. 1

    Configure /dev/shm emptyDir and realistic startup probes

    Mount an emptyDir volume backed by Memory at /dev/shm so NCCL and vLLM shm_broadcast do not fail on 64 MB defaults. Use a startupProbe with enough failureThreshold to cover multi-hundred-GB weight loading.

    # Essential Kubernetes pod volume & probe fields for vLLM
    volumeMounts:
      - mountPath: /dev/shm
        name: dshm
    volumes:
      - name: dshm
        emptyDir:
          medium: Memory
          sizeLimit: 16Gi
  2. 2

    Separate host RAM cgroup OOMKill from GPU CUDA OOM

    Loading sharded safetensors and running Ray object stores consume host RAM. If kubectl describe pod shows Last State: Terminated Reason: OOMKilled, raise pod memory requests/limits rather than lowering --gpu-memory-utilization.

    kubectl describe pod <vllm-pod> | grep -A 12 -iE 'Last State|OOMKilled|Events'
    kubectl logs <vllm-pod> --previous --tail=150
  3. 3

    Verify Ray cluster resources before launching multi-node vLLM

    Confirm every Ray worker node joined the head with matching Python, vLLM, and CUDA versions and that ray status shows enough contiguous GPUs for the requested TP/PP topology.

    ray status
    vllm serve YOUR_MODEL --distributed-executor-backend ray --tensor-parallel-size 8 --pipeline-parallel-size 2
  4. 4

    Verify readiness and model load on a canary pod

    Wait for /health to return HTTP 200, verify /metrics scraping from Prometheus, and run a multi-concurrency canary prompt before attaching the pod to production ingress.

    curl -fsS http://127.0.0.1:8000/health
    curl -fsS http://127.0.0.1:8000/v1/models

Kubernetes and Ray vLLM failure diagnosis

Signals, meanings and actions for how to run vllm on kubernetes and ray clusters reliably.
SignalWhat it meansNext action
Pod status OOMKilled (Exit Code 137)Container exceeded Kubernetes memory limit on host RAM.Increase resources.limits.memory and size /dev/shm emptyDir separately.
Pod restarted mid-download by kubeletlivenessProbe timed out before weight loading finished.Move initial wait to startupProbe with generous periodSeconds and failureThreshold.
PlacementGroupCreationError in Ray logsRay cluster lacks a single bundle layout matching TP/PP GPUs.Run ray status and verify per-worker GPU counts and head/worker alignment.
shm_broadcast TimeoutError on TP > 1 podMissing memory-backed /dev/shm volume mount.Mount emptyDir medium: Memory at /dev/shm.

Evidence checklist

  • kubectl describe pod output including Events and Last State
  • Kubernetes Deployment/Helm values for resources, probes, and /dev/shm
  • ray status and worker pod logs for multi-node serving
  • vLLM Docker image tag and --gpu-memory-utilization flag
  • Host kernel dmesg OOM or Xid events on the scheduled node

Common mistakes

Running livenessProbe on /health during cold model downloads

Large weights take minutes to download and load into HBM; premature kubelet kills cause infinite CrashLoopBackOff.

Lowering --gpu-memory-utilization to fix Kubernetes OOMKilled

OOMKilled is host cgroup RAM exhaustion, not CUDA VRAM exhaustion.

Mixing head and worker container tags in Ray

Even minor vLLM or PyTorch patch differences break Ray actor serialization and NCCL.

Frequently asked questions

Why does vLLM enter CrashLoopBackOff in Kubernetes when loading a 70B+ model?

The two most common causes are a livenessProbe killing the pod before model loading completes (fix with startupProbe) and container memory limits terminating the pod with OOMKilled while mapping safetensors.

What size should /dev/shm emptyDir be for vLLM in Kubernetes?

Allocate 8 GiB to 16 GiB via emptyDir with medium: Memory when running tensor parallelism across 2 to 8 GPUs.

When should I use Ray with vLLM on Kubernetes?

Use Ray (or LWS + Ray) when a single model exceeds one node GPU memory capacity and requires multi-node tensor/pipeline parallelism. For models that fit on one node, run standard multi-replica Kubernetes Deployments without Ray.

Does --gpu-memory-utilization control Kubernetes memory limits?

No. --gpu-memory-utilization reserves GPU HBM only. Host RAM consumed by weights, Python workers, and /dev/shm counts toward Kubernetes resources.limits.memory.

Live diagnosis, no signup

Upload your GPU log. Find what happened first.

Get the likely cause, supporting evidence, and next safe steps with the same cloud reasoning used by paid plans. A crash the engine recognizes is answered in seconds, then checked by an independent AI review that updates this page when it finishes. A crash it does not recognize waits for the AI's own answer, which can take a few minutes. No account, card, or installation. Logs are masked at Denpex API ingress and are not saved to account history.

Before uploading, review cloud data handling and local options.

training_logs.txt
No log to hand? Try one:

Upload your log file. Large files are processed in your browser. Only selected evidence is submitted when you run diagnosis.

3 free cloud diagnoses per day

Try Denpex for 30 days. FREE.

No credit card. No automatic subscription. See whether Denpex helps with an incident you already understand.

Start your free 30-day Team evaluation

Up to 50 diagnoses a day for 30 days. Verify your work email to activate an eligible company evaluation, then replay a resolved incident and compare the evidence and next steps with your team's confirmed cause.

Use your company email, for example alex@yourcompany.com.

Who qualifies?

Company email domains activate the free 30-day Team evaluation (up to 50 diagnoses a day) after an email and domain check, whatever mail provider you use. If we cannot verify your domain automatically, support reviews it: write to support@denpex.com. Free local diagnosis in the editor extension needs no account.

Using a personal email (Gmail, Outlook, Naver, QQ) or solo cluster? Create a free $0 account (no work email required) to save 7-day history and unlock AI fallback, or send a cluster crash log for a live walkthrough.

Apply the method to your incident

Use the three free diagnoses to review your error and relevant evidence. Keep reference guidance separate from the cause and recovery status of your own workload.

Diagnose your incident