App template
Ollama
Runs local models on the CPU; its API is reachable only inside the cluster.
- Memory when idle
- about 110 MiB
- CI measures it once the app is ready and before any traffic. Leave room for more.
- Tested on
- x86 servers
Introduction
Ollama runs large language models and serves them through an HTTP API.
This template runs one Ollama on the CPU, with a 50 GiB volume for models. It has no domain, no web page and no sign-in. Only Pods you allow, in the same namespace, can reach its API. No model is preloaded.
Values you provide
You don’t fill in anything when you deploy.
Getting started
-
In Zeabur OSS, open the
ollamaservice. When Overview shows its replica as ready, the service is up. It has no domain. -
Other workloads reach Ollama at Service
ollama, port11434, for examplehttp://ollama:11434. The template allows only Pods in the same namespace that carry this label:templates.zeabur.com/ollama-client: "true" -
To use the API from your own computer, forward the port, then use
http://localhost:11434. Zeabur OSS has no UI for port forwarding, so use kubectl:kubectl -n <namespace> port-forward service/ollama 11434 -
Pull a model. Read the model’s license and check its size first. The Pod has an 8 GiB memory limit, so large models do not fit. Click Terminal at the top of the
ollamaservice page and run:ollama pull <model>
There is no password, so the template creates no Secret.
Configuration
Connect an OpenAI client
Ollama has an OpenAI-compatible API. Set the client’s base URL to http://ollama:11434/v1. The client needs an API key value, but Ollama ignores it, so use any text. See OpenAI compatibility in the Ollama docs.
List and remove models
Click Terminal at the top of the ollama service page and run:
ollama ls
ollama rm <model>
See CLI reference in the Ollama docs.
Troubleshooting
A connection from a Pod times out
The Pod needs both labels from Getting started. Check the labels of the Pod that fails, and add the missing one to the Pod template of that workload.
A model is slow or does not load
This template runs on the CPU, with an 8 GiB memory limit and one loaded model at a time. Click Terminal at the top of the ollama service page and run ollama ps to see what is loaded. Choose a smaller model if the model does not fit. The Logs tab of the service shows the reason.
ollama ps
See FAQ and Troubleshooting in the Ollama docs.
Resources
Each service is guaranteed the first amount and can use up to the second.
ollama
Ports
11434
CPU
0.5 cores to 4 cores
Memory
2 GiB to 8 GiB
Technical details
This release
- Version
- 0.40.16
- Licence
- MIT
- Homepage
- github.com
- Source file
- templates/ollama/template.yaml @ v0.6.3
Tested in CI
CI installs these exact files on a new cluster, waits until they are ready, then records the idle memory.
| Distribution | Platform | Kubernetes | Passed | Idle memory |
|---|---|---|---|---|
| kind | linux/amd64 | v1.37.0 | 113 MiB |
Security
The container runs as UID 1000 with no extra system privileges and a read-only image. The API has no sign-in. Only clients in the same namespace that carry a specific label can reach it.
Known risks
Risk
The Ollama API has no sign-in, and anyone who can reach it can manage models.
How it is handled
There is no Ingress or NodePort. Only trusted pods in this namespace that carry the label templates.zeabur.com/ollama-client=true can connect. Do not attach a public route to this service, because it has no sign-in.
Risk
Each model has its own license, separate from the MIT license of the Ollama software. Model files can also use up all your RAM and disk.
How it is handled
No model is preloaded. Read each model's license and check its size, then run `ollama pull MODEL` in the Pod. The Pod loads one model and serves one request at a time. It has an 8Gi memory limit and a 50Gi volume, so most large models do not fit.
What the cluster needs
Zeabur OSS suggests the components a cluster is missing. Without it, install them first.