Serving a local model on Kubernetes on your own laptop with kind and Ollama
- Hardware
- Framework 13 laptop (Intel Core Ultra X7 358H, 62 GB RAM, Intel Arc B390) on Fedora 44; Framework desktop (Ryzen AI Max+ 395, Radeon 8060S) on Fedora 43
- Models & engines
- Ollama 0.40.13 (ollama/ollama and the -rocm image), model llama3.2:3b (Q4_K_M)
- Key gotcha
- Ollama ignores integrated GPUs that aren't on its allowlist; the Arc B390 needed OLLAMA_IGPU_ENABLE=1.
What they built
Alex Jones wanted a Kubernetes model-serving guide that runs on the laptop or desktop you already have, rather than a toy CPU demo or a cloud rack of H100s. The guide serves llama3.2:3b with Ollama inside a local kind cluster.
It covers four paths, each tested: CPU only, Intel Arc (Vulkan), NVIDIA (CUDA via nvkind) and AMD (ROCm), with one Deployment, one PVC and one Service.
In the last step the served model is put to work on the cluster itself: k8sgpt sends its findings to the local model for an explanation, with no API key and nothing leaving the machine.
Setup
- Framework 13 laptop (Intel Core Ultra X7 358H, 62 GB RAM, Intel Arc B390) on Fedora 44; Framework desktop (Ryzen AI Max+ 395, Radeon 8060S) on Fedora 43
- Docker, kind v0.33.0, Kubernetes v1.37.0, kubectl v1.37.2, Helm v4.3.1
- Ollama 0.40.13 (ollama/ollama and the -rocm image), model llama3.2:3b (Q4_K_M)
- llmfit 1.1.18 to choose a model, k8sgpt 0.4.41 to diagnose the cluster, k9s optional
- Pod requests 4 CPU cores and 4 GiB, limited to 8 GiB memory, with a 20 Gi PVC for models
How it works
- An init container starts Ollama, pulls the model into the PVC and exits, so restarts don't download 2 GB again.
- A device plugin DaemonSet advertises the GPU (gpu.intel.com/xe, nvidia.com/gpu or amd.com/gpu) so the pod can request it in its limits.
- OLLAMA_CONTEXT_LENGTH is pinned to 8192 on the GPU paths to keep the KV cache small.
- Ollama's OpenAI-compatible endpoint is reached through kubectl port-forward, and bench.sh reads Ollama's timing counters.
Results & numbers
- Generation speed was about 7.3 tok/s on CPU, about 21 tok/s on the Arc B390, about 85 tok/s on the Radeon 8060S and about 89 tok/s on a Tesla T4.
- On the GPU paths all 29 layers were offloaded, using 3.1 GB of GPU memory with an 896 MiB KV cache.
- k8sgpt with the local 3B model explained a missing-secret failure in 26 seconds on CPU; the advice was generic but right.
Gotchas
- Ollama ignores integrated GPUs that aren't on its allowlist; the Arc B390 needed OLLAMA_IGPU_ENABLE=1.
- Left alone on the Strix Halo, Ollama chose a 131,072-token context and a 14 GiB KV cache for a 3B model; pinning 8192 tokens dropped it to 896 MiB.
- On a machine with fewer than 5 cores the pod stays Pending with Insufficient cpu until you lower the request.
- With the Recreate strategy a bad image tag takes the model down, and the port-forward dies with the old pod.
“No API key, and nothing left the machine.”— Alex Jones
Do it yourself
- Check what fits with llmfit using the pod's limits (for example --ram 8G --cpu-cores 4).
- Create a kind cluster from the guide's repo configs, mounting /dev/dri (and /dev/kfd for AMD) for GPU paths.
- Install the matching GPU device plugin and confirm the node advertises the GPU resource.
- Apply the Ollama manifests, wait for 1/1 Running, and check the 'inference compute' log line for the backend.
- Port-forward the Service, call /v1/chat/completions, then add k8sgpt's ollama backend and run analyze --explain.
kubectl -n llm port-forward svc/ollama 8081:80 &
k8sgpt auth add --backend ollama --model llama3.2:3b --baseurl http://localhost:8081
k8sgpt analyze --kubeconfig ./kubeconfig --namespace llm --explain --backend ollamaSimilar setups
A one-script Ubuntu install that stands up Ollama and Open WebUI as a private ChatGPT in the browser
HendGrow’s guide 50 ships a Bash installer that detects NVIDIA GPU or CPU, deploys pinned Ollama and Open WebUI with Docker Compose on Ubuntu 24.04, pulls a small starter model, and opens the UI on port 3000.
A €200 mini PC as an offline AI box: a week with Gemma and Qwen
Diogo Soares ran Gemma 4 E4B and Qwen2.5-Coder 7B on a cheap NiPoGi P1 mini PC firewalled off the internet, used it from his Mac for a week, and measured what was fast and what wasn't.
A private OpenAI-compatible LLM API on an AMD GPU with llama.cpp
A Vietnamese developer's notes on building llama.cpp for AMD cards, choosing between Vulkan and ROCm, and running llama-server as a locked-down systemd service that existing OpenAI SDK code can call.
Ollama next to n8n on a CPU-only VPS: measured speed and RAM
A developer measured how fast Ollama runs Llama 3.x models on an 8-vCPU VPS with no GPU, and how much RAM a self-hosted n8n really uses beside it, and published the raw numbers.