Running Ollama on Kubernetes with GPU nodes: when a cluster is the right host
This page covers how to run the ollama/ollama image on Kubernetes with GPU node pools, device plugins, persistent volumes for models, in-cluster service exposure, one model server per GPU pool, and scaling limits. If your platform team already operates Kubernetes and must host shared models on GPU nodes, the cluster can be the right place for Ollama, but only if you accept the extra work of managing GPU scheduling and the model volume. Ollama is an open source runtime for running large language models, written in Go with a llama.cpp backend and licensed under MIT. It exposes a REST API on port 11434, with OpenAI compatibility and Python and JavaScript SDKs. By default it binds to 127.0.0.1, so inside a cluster you must deliberately change its bind address with OLLAMA_HOST before any other pod can reach it.
A single Linux GPU server is usually the simpler host when one team uses a few models, when no one else in the organization runs Kubernetes, or when the GPU is dedicated to Ollama anyway. A cluster starts to pay off when several teams need the same models, when GPU capacity is shared with other workloads, or when your platform team already enforces deployment through GitOps, admission policy and monitoring. The cluster adds scheduling, so the scheduler places the Ollama pod only on nodes that expose a GPU resource. It adds node pools, so GPU nodes can be isolated with labels and taints from general workloads. It also adds ownership questions: someone must own the persistent volume that holds model weights, its size, its backup and the rules for who can pull or delete models.
Before you commit, confirm with your cluster team which Kubernetes minor version you run and whether your GPU vendor's device plugin supports it, because support windows differ across Kubernetes releases. Ask who will own the GPU driver and container toolkit on each node, since a cluster does not remove that work. Decide early whether one model server per GPU pool is acceptable for your traffic, because Ollama's own concurrency settings control how requests share a loaded model. These decisions shape the build sequence that follows, and they are cheaper to settle now than after models are loaded into production volumes.
How the GPU node pool, device plugin, model volume and Service connect
The path starts with client pods inside the cluster calling a ClusterIP Service on port 11434. The Service routes to the Ollama pod, which is scheduled onto a GPU node pool, where the device plugin exposes the GPU to the container. Models live on a persistent volume mounted into the pod, so they survive pod restarts. Users outside the cluster network sit behind a separate trust boundary, and nothing in this path adds authentication, so that gate must be placed deliberately before any external exposure.
Request, GPU and model storage paths inside one cluster, with the external trust boundary marked.
Configuration options and when each one fits
This table compares the placement, storage, exposure and concurrency choices a platform team makes when running Ollama on GPU nodes. Read each row as a decision: the option, when it fits, and what it costs to operate. The main takeaway is that dedicated GPU pools and persistent model volumes cost more to set up but make model loading and capacity predictable.
| Decision | When it fits | Operational cost |
|---|---|---|
| Dedicated GPU node pool with taints and tolerations | One Ollama server per GPU pool, with other workloads kept off the GPUs | Idle GPU capacity is harder to share, and node labels, taints and tolerations must be kept consistent across upgrades |
| Shared GPU pool | Several teams or services use the same nodes and scheduling is handled by the cluster | Noisy neighbors compete for VRAM, so model loading and eviction can be harder to predict |
| Persistent volume for models | Models are large and reused, and restarts should not re-download weights | Storage must be sized for every model, and volume backups and access modes need an owner |
| Model pull at start-up | Few models, small sizes, or environments where each pod should start from a clean state | Each restart pulls weights again, which lengthens start-up and depends on outbound network access |
| ClusterIP Service | Only applications inside the cluster call the API, behind their own gateway or sidecar | Clients outside the cluster need another path, and access control must be added in front of the API |
| Ingress in front of the Service | Users or systems outside the cluster call the API through a controlled entry point | Adds TLS, authentication and routing configuration to maintain, and the API itself has no built-in authentication |
| OLLAMA_NUM_PARALLEL (default 1) | Latency matters more than throughput, or the model barely fits in VRAM | Higher values share the loaded model across more requests but increase memory use and per-request latency, so test with your models |
| OLLAMA_MAX_LOADED_MODELS (default 3 times the GPU count) | Several models must stay resident, such as a chat model and an embedding model | Each loaded model consumes VRAM, so more loaded models can force unloading or failed loads on a given GPU |
| OLLAMA_MAX_QUEUE (default 512) | Bursty traffic where short waits are acceptable and requests should not be rejected immediately | A deep queue hides overload from clients, so set alerts on queue depth and confirm timeouts in the calling applications |
Why one model server per GPU pool keeps capacity predictable
Dedicating a GPU pool to one Ollama server makes capacity easier to reason about because the limits that govern it are set per server and per model, not per cluster. A single Ollama process loads models into the GPU memory it can see, and several loaded models share that memory. The OLLAMA_MAX_LOADED_MODELS setting controls how many models may stay resident, and its default is 3 times the number of GPUs, or 3 on CPU. If an unrelated workload lands on the same pool, or a second model is pulled for a different team, the memory left for the first model shrinks without any visible change to the Deployment. Keeping one server per pool means the pool's GPU memory is spent on the models you chose, and the scheduler does not have to guess which tenant's workload is competing for it.
Concurrency works the same way. OLLAMA_NUM_PARALLEL defaults to 1 parallel request per model, and OLLAMA_MAX_QUEUE defaults to 512 queued requests. Requests beyond the parallel limit wait in the queue, and a queue that fills returns errors to callers. Before you raise either value on a Deployment, confirm that the pool's VRAM can hold the extra context those requests need, because higher parallelism multiplies memory use per model. Add a second pool or a second server when one of these conditions holds: distinct teams need separate model sets or quotas, a latency-sensitive model cannot share memory with batch jobs, or a model that fits alone does not leave room for the parallelism your users need. Adding replicas of the same model to one pool is a different decision, and it needs its own sizing check.
The exact VRAM each model needs, and which models fit a given GPU at your context length, belong to the hardware sizing work, and the facts behind this page do not quantify them. Confirm the model footprint, the context window and the parallel request count against the GPU model in your node pool before you set resource requests or limits. Record the result per pool, so an operator can see which models a pool is meant to hold and what happens when someone adds another.
How to run Ollama on Kubernetes with GPU nodes, step by step
This sequence takes a Kubernetes cluster from a version check to a verified Ollama server that loads a model and answers on port 11434 from inside the cluster. Each step names the object or setting it changes and the check that confirms it worked.
Confirm the cluster version is supported
The platform team checks the cluster's minor version against the releases listed on the Kubernetes releases page before anything else changes. The project maintains only the three most recent minor releases, so a cluster on an older minor needs an upgrade first, and the version skew policy governs the order in which control plane components and kubelets move. Done means the team has recorded the current server version, and that version appears in the supported list. Confirm the GPU driver and container runtime support for your chosen Ollama tag with the vendor before the node pool is built.
Label and taint the GPU node pool
The cluster administrator adds a label such as a GPU type marker to the GPU nodes and a taint so that ordinary workloads do not schedule onto them. The Ollama Deployment then carries a matching toleration and node selector, so only the model server lands on the accelerators. Done means
kubectl get nodes --show-labelslists the label on each GPU node andkubectl describe nodeshows the taint. Confirm the label and taint names with your own cluster policy, since they are local conventions and not fixed by Ollama.Install the GPU device plugin for your vendor
The platform team installs the device plugin that matches the accelerator vendor in use, so the kubelet advertises GPUs as schedulable resources. The plugin runs as a DaemonSet on the GPU pool and must be installed from the vendor's current documentation and checked against your Kubernetes minor. Done means each GPU node reports the GPU resource under its allocatable capacity, which you can confirm with
kubectl describe node. If the resource does not appear, fix the plugin before deploying Ollama, because the pod will otherwise stay pending or run without a GPU.Create a persistent volume claim for models
The team creates a PersistentVolumeClaim with a storage class that keeps data across pod restarts and rescheduling, sized for the model set it expects to hold. Model weights are large and re-pulling them on every restart wastes time and bandwidth, so the claim should outlive the pod. Done means the claim shows a Bound status with
kubectl get pvc. Ask your storage team whether the class supports the access mode you need, and plan model sizes with the hardware sizing guidance before choosing capacity.Deploy the pinned ollama image with model storage
The engineer writes a Deployment that runs the
ollama/ollamaimage at a specific tag that has been tested in a staging cluster, rather than the floating latest tag. The container mounts the claim and setsOLLAMA_MODELSto that mount path, so model files are written to the volume and not the container layer. Requesting the GPU resource in the container spec ties the pod to the device plugin. Done means the pod reaches Running and its logs show the server starting without errors on the expected path.Set OLLAMA_HOST and expose a ClusterIP Service
By default Ollama binds to 127.0.0.1 on port 11434, which a Service cannot reach from another pod, so the engineer sets
OLLAMA_HOSTto an address that listens on the pod network, such as 0.0.0.0:11434. The engineer then creates a ClusterIP Service that selects the Deployment and forwards port 11434. Because the API has no built-in authentication, the Service should stay internal and be reachable only by namespaces that need it. Done means the Service lists the pod as an endpoint withkubectl get endpoints. Confirm your network policy and access controls with the security team before any wider exposure.Verify a model loads and answers on port 11434
From a temporary pod in the same namespace, the engineer pulls a model that has been approved for use, then sends a short request to the Service on port 11434 to confirm the GPU handles inference. Running
nvidia-smior the vendor equivalent inside the pod shows the model memory in use. Done means the model appears in the list of local models, the generate request returns text, and the GPU shows memory allocated during the request. Record the image tag, model name and Service address in the change record so the next upgrade can repeat this check.
Node pool layouts by environment: managed cloud, self-managed and air-gapped
In a managed Kubernetes service, the provider runs the control plane and often provisions GPU worker nodes through node pool settings, so your team mainly decides pool size limits, instance types and how pods land on them. Ollama fits best in a dedicated GPU pool with one model server per pool, because a pod that loads a model holds GPU memory for as long as the model stays resident. Autoscaling helps only if new GPU nodes come up quickly enough for your users and if scale-down does not evict a pod that is serving requests.
- Pool scope: Keep the Ollama pool separate from general workloads, with a taint and matching tolerations so other pods do not compete for GPU memory.
- Autoscaling bounds: Set a minimum that keeps one model server warm, since a cold GPU node can take a long time to start and load weights.
- Idle GPU cost: A GPU node billed by the hour costs the same whether or not requests arrive, so the minimum pool size is a recurring expense to justify.
- Storage class: Confirm the provider offers a persistent volume type that the pool can attach across node replacements, and that model volumes survive pool recreation.
- Provider GPU support: Confirm the device plugin or GPU operator the provider installs, the driver version it manages and who patches it.
Ask the provider or your platform team to confirm the GPU instance types, quota in your region and the billing model for idle nodes before you size the minimum pool.
With a self-managed cluster built using kubeadm, your team provisions every node, installs the container runtime, the NVIDIA driver and the device plugin, and runs the control plane. Node provisioning becomes a repeatable build process, and control plane availability is a design decision you own. The kubeadm high availability guide describes a stacked topology with etcd on the control plane nodes or an external etcd cluster, with at least three control plane nodes and a TCP load balancer in front of the API server on port 6443. Ollama does not change these choices, but a GPU node that fails takes its loaded models with it, so the GPU pool needs its own recovery plan.
- Node build: Automate GPU driver and device plugin installation so a replacement GPU node matches the others before it joins the pool.
- Control plane topology: Choose stacked or external etcd based on your operating model, and confirm the load balancer and port 6443 are reachable from all nodes.
- etcd sizing: Run an odd number of etcd members, and confirm backup and restore procedures are tested before go-live.
- Version alignment: Keep kubelets within the version skew range of the API server, and plan GPU driver upgrades around node drains.
- Ownership: Name who patches the operating system, driver, device plugin and Kubernetes components, and on what schedule.
Before you build, confirm which control plane topology your team can operate and who is on call for etcd restores and GPU node replacement.
In a restricted network, nodes cannot pull the Ollama image or model weights from public registries, so both must reach the cluster through internal channels. The cluster itself may be built the same way as a self-managed one, but the image and the model volume become provisioning steps that need to finish before the server starts. Ollama pulls models on demand by default, so an unplanned pull can fail at runtime. Pre-loading the model volume and mirroring the image into an internal registry move these dependencies into a controlled release process.
- Image mirror: Copy the ollama/ollama image into an internal registry, pin the tag you tested, and point the deployment at that registry path.
- Model pre-load: Populate the persistent volume with approved model files before the server is exposed, and record the checksum or source of each model.
- Volume location: Set OLLAMA_MODELS to the mount path so the model directory sits on the persistent volume, and confirm the pod user can write to it.
- Cloud features: Turn off cloud features with OLLAMA_NO_CLOUD=1 so the server does not attempt outbound calls.
- Update path: Define how a new image or model version passes through the internal registry and test environment before it reaches the GPU pool.
Confirm with your security team which registry and model sources are approved, and test a restart in an isolated cluster to verify that no outbound connection is needed.
Security risks of running Ollama on Kubernetes with GPU nodes
Ollama's local API ships with no authentication, and Kubernetes leaves Secrets unencrypted in etcd by default, so the cluster has to supply the access controls the model server does not. The cards below cover the controls to set before a model server takes traffic, and the checks to repeat after each upgrade.
Restrict the unauthenticated API
The local Ollama API at port 11434 does not require authentication, so anything that can reach the Service can run inference and pull models. Limit ingress to the Ollama pods with a NetworkPolicy that allows only named client namespaces or gateway pods, and put an authenticating gateway in front of any route that leaves the cluster. Confirm that no Ingress or LoadBalancer Service exposes the port directly.
Ollama API authenticationEncrypt Secrets at rest
Kubernetes stores Secrets unencrypted in etcd by default, and Ollama deployments often hold registry tokens, gateway credentials and proxy settings in them. Enable encryption at rest for the API server, restrict list and watch access on Secrets, and confirm the setting by reading a Secret directly from etcd in a test cluster. Plan for etcd snapshots to be encrypted as well, since a backup contains the same data.
Secrets good practicesSet Pod Security Standards per namespace
GPU workloads often request privileged access to device files, which weakens isolation for everything else on the node. Apply the Pod Security Standards labels to the namespace that runs Ollama and choose the level your GPU device setup can meet. Test the policy with a dry run before enforcing it, because device plugin pods and the Ollama pod may need different settings.
Pod Security StandardsGrant least-privilege RBAC
Give the Ollama service account only the permissions it needs, usually none beyond reading its own configuration. Separate the roles that can deploy or scale the model server from those that can read logs, exec into pods or change the NetworkPolicy. Review bindings after each change, because a broad exec permission lets someone pull models or read the model directory from inside the pod.
Kubernetes authenticationTurn off cloud features where data must stay local
Ollama states that a local instance does not see your prompts or data, and cloud features can be disabled with OLLAMA_NO_CLOUD=1 or the server configuration file. Set the variable in the pod spec for any workload with a data residency requirement, then confirm from the pod environment that it is present. Direct cloud inference uses an API key sent as a Bearer token, so block outbound access to the cloud endpoints where that path is not approved.
Patch the image on the release cycle
Ollama ships frequent releases, and the image and the Kubernetes version under it both need regular updates. Pin the image to a tested tag rather than a floating tag, record each upgrade in change control, and review release notes for security fixes before rollout. Keep Kubernetes within the supported minor versions, since a cluster that falls out of support stops receiving security patches.
Ollama releasesWhat do teams ask before hiring help for Ollama on Kubernetes?
What drives the cost of running Ollama on Kubernetes with GPU nodes?
Cost is driven by the work and the infrastructure it touches, not by a fixed package. The main components are GPU node pool design and the device plugin setup, persistent volumes sized for model weights, how the model server is exposed inside the cluster, the high availability and backup posture of the cluster underneath, and the security review the organization requires. Each of these can add scope. Ask any partner for a written scope that lists each component separately, and state which items are one-time setup and which recur, such as upgrades and monitoring. Your own cloud or data center costs for GPUs and storage are billed by your provider and are not part of a services quote.
How long does a fixed-scope Ollama on Kubernetes build take?
Duration depends on how much of the platform already exists and how many decisions remain open. A cluster with GPU nodes, a working device plugin, storage classes and an agreed network policy shortens the build. A new cluster, unresolved identity integration or an unplanned security review lengthens it. No duration figure is supplied for this topic, so ask for a timeline in the written scope that names the prerequisites, the sign-off points and who must act at each step. Ask what happens if a prerequisite, such as GPU driver access or a model approval, arrives late.
What must our team provide before an Ollama on Kubernetes engagement starts?
Plan to supply four things: cluster access with a defined role for the work, the GPU hardware and the node pools it will run on, the list of models your organization has approved along with their weights or source location, and the network rules that decide which clients can reach the model server. Access to your identity provider and your logging and monitoring tools also speeds up the build. Confirm these inputs in writing during scoping, because missing approvals or firewall changes are a common cause of schedule slippage.
Can our in-house platform team deploy Ollama on Kubernetes without a partner?
Yes, a capable platform team can do this without outside help, provided it has Kubernetes administration experience, has run GPU workloads before and can own the work after go-live. The skills that usually decide the outcome are GPU device plugin configuration, persistent volume planning for large model files, cluster authentication and secrets handling, and patching on a schedule. Check whether the team can cover these areas within your timeline. A partner is most useful when the team is short on one of these skills, or when the security review needs independent testing of the result.
Which Kubernetes version and support window should we plan around?
Plan around the versions the Kubernetes project still supports at the time of your build, and check that date on the release page before you choose. As of September 2026, the project maintained 1.37, 1.36 and 1.35, with end-of-life dates in 2027. Kubernetes minor releases arrive about three times a year, and patch support runs roughly a year. Under the version skew policy, the API server must be upgraded one minor version at a time, and kubelets may lag by up to three minor versions. Ask your partner how the GPU operator, device plugin and Ollama image versions will be tested against each Kubernetes upgrade.
What does DeployOpen do after an Ollama on Kubernetes go-live?
DeployOpen can support the platform after go-live through a retainer, which covers ongoing work such as upgrades, monitoring follow-up and continuous testing, scoped in writing. Upgrades of Kubernetes, the Ollama image and the GPU stack should be planned as recurring work, because Ollama ships frequent releases, including v0.40.5 released on 14 October 2026. DeployOpen can also prepare the documentation and evidence your compliance team needs for a review. DeployOpen does not issue audit reports or certifications, and independent auditors perform those assessments.
Does DeployOpen fix GPU scheduling and model loading problems after launch?
Scheduling and loading issues are covered when they fall within the agreed scope, and the scope should name them. Typical problems include pods that cannot see a GPU, a model that fails to load because the volume is too small, or too many models loaded at once. The Ollama settings OLLAMA_NUM_PARALLEL, OLLAMA_MAX_LOADED_MODELS and OLLAMA_MAX_QUEUE control concurrency, with defaults of 1 parallel request per model, 3 times the number of GPUs for loaded models, and 512 queued requests. Ask your partner to document the chosen values, the reason for each, and the runbook for overload.
Do we need a security review before putting Ollama on a shared cluster?
Yes, a review is strongly advisable for any shared cluster because the local Ollama API has no authentication of its own and binds to 127.0.0.1 port 11434 by default. Exposure through a service or proxy therefore needs an access layer in front of it. Secrets such as API keys must be protected, since Kubernetes stores Secrets unencrypted in etcd by default unless encryption at rest is configured. DeployOpen can test the setup and deliver a findings report with fixes and a retest. Confirm in writing which controls the review covers and who signs off on the result.
Scaling limits and what to confirm in your cluster
Ollama's concurrency defaults, queue depth and model ceiling decide how much work one model server can take, and Kubernetes adds its own version and device constraints. Read these cards before sizing node pools, replica counts and upgrade windows.
One parallel request per model
Ollama's OLLAMA_NUM_PARALLEL defaults to 1, so each loaded model serves one request at a time unless you raise it. Each extra parallel slot needs memory for its own context, so raising the value on a GPU that is already near its limit can cause loading or out-of-memory failures. Test concurrency on the actual GPU before you set it in the Deployment's environment.
Loaded-model ceiling tied to GPUs
OLLAMA_MAX_LOADED_MODELS defaults to 3 times the number of GPUs, or 3 on CPU. Pods are scheduled by GPU count, so the ceiling follows the GPUs the pod can see. Confirm the GPU count reported inside the pod matches your node pool design, because a mismatch changes how many models can stay resident before eviction.
Queue depth default of 512
OLLAMA_MAX_QUEUE defaults to 512 queued requests. A deep queue hides overload: clients wait longer and time out while the GPU stays busy. Decide what your gateway or application should do when the queue fills, and set client timeouts and retry behavior to match the queue you choose rather than the default alone.
Replicas on one node share GPU memory
Adding Deployment replicas on a node that has one GPU does not add GPU memory. Each replica loads its own copy of model weights into the same device, which can exhaust VRAM sooner. Scale out to additional GPU nodes instead, and use one model server per GPU pool so placement stays predictable.
Maintained Kubernetes minor versions
The Kubernetes project maintains the three most recent minor releases. As of September 2026 these were 1.37 (end of life October 28, 2027), 1.36 (June 28, 2027) and 1.35 (February 28, 2027). Choose a cluster version that stays inside support for the life of the model server, and plan upgrades around the version skew policy so kubelets on GPU nodes keep pace with the API server.
- End of life for 1.37
- Oct 28, 2027
GPU device plugin and driver compatibility
The GPU device plugin, the node driver and the container runtime must match your GPU model and the Ollama image variant you run. Confirm support for your exact hardware, driver branch and plugin version with the GPU vendor and the plugin's documentation before procurement. Ask the vendor which driver versions they test with each Kubernetes minor release you plan to run.
How DeployOpen scopes, builds and supports Ollama on Kubernetes
DeployOpen plans, implements, hardens, documents and supports self-hosted open-source platforms inside the client's own infrastructure. For Ollama on Kubernetes with GPU nodes, that means agreeing the node pools, storage, exposure and concurrency limits in writing first, then building and verifying them in your cluster, and handing over runbooks your team can operate.
How we scope
- Inventory your cluster version, GPU node pools, device plugin status and the models your teams need to serve
- Agree one model server per GPU pool and the in-cluster service consumers will call
- Write down persistent volume sizing, OLLAMA_MODELS placement and the concurrency settings each pool will use
How we build
- Deploy the ollama/ollama image with GPU scheduling, persistent model storage and access restricted to the cluster network
- Put authentication and a reverse proxy in front of the API, since the local API does not require authentication
- Test model loading, queue behavior under load and recovery after a pod or node restart before sign-off
How we hand over
- Document the manifests, Helm values or GitOps layout, environment variables and the reasons behind each setting
- Provide runbooks for adding a GPU pool, pulling or removing models and handling Ollama version changes
- Walk your platform and security teams through the configuration so they can review it against their own controls
How we support
- Engagements are fixed-scope, with scope, deliverables and timelines agreed in writing before work starts
- Ongoing support, upgrades and continuous testing are available as a retainer after handover
- Confirm with your Kubernetes distribution vendor and Ollama release notes before each upgrade, since both change on their own schedules

