<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/running-a-self-hosted-llm-in-kubernetes-with-vllm-znxvebe4x" -->

---
title: Running a self-hosted LLM in Kubernetes with vLLM
description: A step-by-step walkthrough for deploying a self-hosted LLM inference server in Kubernetes using vLLM and LINSTOR persistent storage. The setup uses Meta's...
canonical: https://daily.dev/posts/running-a-self-hosted-llm-in-kubernetes-with-vllm-znxvebe4x
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: Running a self-hosted LLM in Kubernetes with vLLM | daily.dev
og:description: A step-by-step walkthrough for deploying a self-hosted LLM inference server in Kubernetes using vLLM and LINSTOR persistent storage. The setup uses Meta's...
og:url: https://daily.dev/posts/running-a-self-hosted-llm-in-kubernetes-with-vllm-znxvebe4x
og:image: https://api.daily.dev/og/posts/znXveBE4x.png
og:image:alt: Running a self-hosted LLM in Kubernetes with vLLM
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Running a self-hosted LLM in Kubernetes with vLLM

**[CNCF](https://daily.dev/sources/cncf)** · 6 min read · 3 upvotes · 1 comments

## Summary

A step-by-step walkthrough for deploying a self-hosted LLM inference server in Kubernetes using vLLM and LINSTOR persistent storage. The setup uses Meta's Llama-3.2-1B-Instruct model, which is small enough to run on CPU. Key steps include creating a PersistentVolumeClaim backed by LINSTOR's DRBD-replicated storage to cache model weights, storing the Hugging Face access token as a Kubernetes Secret, and deploying vLLM as a Kubernetes Deployment with an OpenAI-compatible REST API. Practical tips cover memory utilization flags for CPU-only deployments, watching startup logs, testing with a curl pod, and scaling to zero without losing cached weights. The article also points toward next steps like adding GPU nodes, fine-tuning, and using an inference router like llm-d for hybrid cloud/local dispatch.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://www.cncf.io/blog/2026/07/16/running-a-self-hosted-llm-in-kubernetes-with-vllm>

## Questions this post answers

### How do I fix vLLM startup failures on a CPU-only Kubernetes deployment related to memory reservation?

Set the --gpu-memory-utilization flag explicitly, since vLLM defaults to reserving 92% of available memory even on CPU-only setups, which can cause startup failures. Setting the value to 0.80 provides enough headroom for the engine to initialize successfully in a memory-constrained lab environment.

_daily.dev surfaces practical fixes like this for engineers debugging self-hosted LLM deployments on Kubernetes._

### Where should I mount persistent storage for vLLM to cache downloaded Hugging Face model weights in Kubernetes?

Mount a persistent volume at /root/.cache/huggingface inside the vLLM container, which is the default cache path vLLM uses for downloaded model weights. Backing this path with a PersistentVolumeClaim means the model downloads only once, and later pod restarts skip re-downloading because the weights persist on the volume.

_Engineers building self-hosted inference stacks track storage patterns like this through daily.dev._

### How can I pause a vLLM Kubernetes deployment without losing the downloaded model weights?

Scale the deployment to zero replicas using kubectl scale deployment vllm-server --replicas=0, which keeps the PersistentVolumeClaim and cached model weights intact. When scaled back up to one replica, the model does not need to be re-downloaded, saving time on restart.

_daily.dev helps teams keep up with operational tricks for running self-hosted AI workloads on Kubernetes._

## Community discussion

Top comments from developers on daily.dev.

**@kartiknvj** · 0 upvotes

> Backing the model-weights cache with a PersistentVolumeClaim so you can scale to zero without re-downloading is the detail most vLLM walkthroughs skip, and it saved me a lot of cold-start pain on CPU-only nodes. I would add that the memory-utilization flag needs tuning per model or the OpenAI-compatible server OOMs mid-request. Have you tried llm-d for routing yet, and does it handle prefix-cache-aware dispatch across hybrid nodes cleanly?

## Similar posts on daily.dev

- [Running LLM Inference on Kubernetes: What It Actually Takes](https://daily.dev/posts/running-llm-inference-on-kubernetes-what-it-actually-takes-opl6iozrg) · Fairwinds Blog · 0 upvotes · 0 comments
- [LLM Model Storage with NFS: Download Once, Infer Everywhere](https://daily.dev/posts/llm-model-storage-with-nfs-download-once-infer-everywhere-0uv0zekk8) · DigitalOcean Community · 1 upvotes · 0 comments
- [Open-weight AI on Kubernetes: A Developer’s Guide to vLLM vs. KubeAI](https://daily.dev/posts/open-weight-ai-on-kubernetes-a-developer-s-guide-to-vllm-vs-kubeai-hdxk8ddoh) · SitePoint · 0 upvotes · 0 comments
- [Self-Hosting Your First LLM](https://daily.dev/posts/self-hosting-your-first-llm-13jpheaxf) · Towards Data Science · 1 upvotes · 0 comments
- [How to deploy and benchmark vLLM with GuideLLM on Kubernetes](https://daily.dev/posts/how-to-deploy-and-benchmark-vllm-with-guidellm-on-kubernetes-sdxhl6tsh) · Red Hat Developer · 1 upvotes · 0 comments

---

Tags: [#llm](https://daily.dev/tags/llm), [#kubernetes](https://daily.dev/tags/kubernetes), [#vllm](https://daily.dev/tags/vllm)

[View this post on daily.dev](https://daily.dev/posts/running-a-self-hosted-llm-in-kubernetes-with-vllm-znxvebe4x)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"Running a self-hosted LLM in Kubernetes with vLLM","url":"https://daily.dev/posts/running-a-self-hosted-llm-in-kubernetes-with-vllm-znxvebe4x","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/running-a-self-hosted-llm-in-kubernetes-with-vllm-znxvebe4x"},"datePublished":"2026-07-16T11:04:57.825Z","dateModified":"2026-09-14T08:56:56.551Z","description":"A step-by-step walkthrough for deploying a self-hosted LLM inference server in Kubernetes using vLLM and LINSTOR persistent storage. The setup uses Meta's...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/47551ad438a21d829506365dd097a4db?_a=AQAEuop","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/47551ad438a21d829506365dd097a4db?_a=AQAEuop","isAccessibleForFree":true,"articleSection":"CNCF","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"CNCF","logo":"https://media.daily.dev/image/upload/t_logo,f_auto/v1/logos/55536a03390741eebd96d2f9b74d2d8d","url":"https://daily.dev/sources/cncf"},"commentCount":1,"discussionUrl":"https://daily.dev/posts/running-a-self-hosted-llm-in-kubernetes-with-vllm-znxvebe4x","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":3},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":1}],"keywords":"llm,kubernetes,vllm","timeRequired":"PT6M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"CNCF","item":"https://daily.dev/sources/cncf"},{"@type":"ListItem","position":3,"name":"Running a self-hosted LLM in Kubernetes with vLLM"}]}
{"@context":"https://schema.org","@type":"WebPage","@id":"https://daily.dev/posts/running-a-self-hosted-llm-in-kubernetes-with-vllm-znxvebe4x","comment":[{"@type":"Comment","text":"Backing the model-weights cache with a PersistentVolumeClaim so you can scale to zero without re-downloading is the detail most vLLM walkthroughs skip, and it saved me a lot of cold-start pain on CPU-only nodes. I would add that the memory-utilization flag needs tuning per model or the OpenAI-compatible server OOMs mid-request. Have you tried llm-d for routing yet, and does it handle prefix-cache-aware dispatch across hybrid nodes cleanly?","datePublished":"2026-07-16T13:43:01.006Z","url":"https://daily.dev/posts/znXveBE4x#c-o5lyfqycl","author":{"@type":"Person","name":"kartik-nvjk","url":"https://daily.dev/kartiknvj","image":"https://media.daily.dev/image/upload/s--3gGgsVCw--/f_auto/v1781456774/avatars/avatar_TvTVeiMdkRCqWUDullFmy?_a=BAMAMiWQ0"}}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/running-a-self-hosted-llm-in-kubernetes-with-vllm-znxvebe4x#faq","mainEntity":[{"@type":"Question","name":"How do I fix vLLM startup failures on a CPU-only Kubernetes deployment related to memory reservation?","acceptedAnswer":{"@type":"Answer","text":"Set the --gpu-memory-utilization flag explicitly, since vLLM defaults to reserving 92% of available memory even on CPU-only setups, which can cause startup failures. Setting the value to 0.80 provides enough headroom for the engine to initialize successfully in a memory-constrained lab environment. daily.dev surfaces practical fixes like this for engineers debugging self-hosted LLM deployments on Kubernetes."}},{"@type":"Question","name":"Where should I mount persistent storage for vLLM to cache downloaded Hugging Face model weights in Kubernetes?","acceptedAnswer":{"@type":"Answer","text":"Mount a persistent volume at /root/.cache/huggingface inside the vLLM container, which is the default cache path vLLM uses for downloaded model weights. Backing this path with a PersistentVolumeClaim means the model downloads only once, and later pod restarts skip re-downloading because the weights persist on the volume. Engineers building self-hosted inference stacks track storage patterns like this through daily.dev."}},{"@type":"Question","name":"How can I pause a vLLM Kubernetes deployment without losing the downloaded model weights?","acceptedAnswer":{"@type":"Answer","text":"Scale the deployment to zero replicas using kubectl scale deployment vllm-server --replicas=0, which keeps the PersistentVolumeClaim and cached model weights intact. When scaled back up to one replica, the model does not need to be re-downloaded, saving time on restart. daily.dev helps teams keep up with operational tricks for running self-hosted AI workloads on Kubernetes."}}]}
```

