Helm chartv0.1.2App 0.33.3Verified publisher

A Helm chart for serving small models on CPU or GPU with Ollama

About this chart

ollama

A Helm chart for serving small models on CPU or GPU with Ollama.

The platform backend renders the values below from backend/templates/ollama-llm-values.yaml.jinja; install this chart directly only for local testing.

Setup Helm Repository

helm repo add infracloud-charts https://infracloudio.github.io/charts
helm repo update

See helm repo for command documentation.

Installing the Chart

To install the chart with the release name ollama:

helm install ollama infracloud-charts/ollama

To pull one or more model tags on start, set models.pull to a list of Ollama tags:

helm install ollama infracloud-charts/ollama --set 'models.pull={qwen3:0.6b,smollm2:1.7b}'

The pod runs a postStart hook that waits for the server to answer, then pulls every tag in models.pull; the readiness probe only succeeds once the hook returns, so the pod is Ready only after every requested model is on disk.

Uninstalling the Chart

To uninstall the ollama deployment:

helm uninstall ollama

The command removes all the Kubernetes components associated with the chart and deletes the release, including the PersistentVolumeClaim holding pulled models, so a reinstall pulls every tag again. To keep pulled models across reinstalls, point persistence.existingClaim at a PVC that outlives the release.

Values

KeyTypeDefaultDescription
replicaCountint1Number of pod replicas; keep at 1, models are pulled onto a single ReadWriteOnce volume
image.repositorystring"ollama/ollama"Container image repository
image.pullPolicystring"IfNotPresent"Image pull policy
image.tagstring""Image tag; defaults to the chart appVersion
imagePullSecretslist[]Image pull secrets
nameOverridestring""Override the chart name used in generated resource names
fullnameOverridestring""Override the fully qualified app name
serviceAccount.createbooltrueCreate a ServiceAccount
serviceAccount.automountbooltrueAutomount the ServiceAccount token
serviceAccount.annotationsobject{}Annotations for the ServiceAccount
serviceAccount.namestring""ServiceAccount name; defaults to the fullname template
podAnnotationsobject{}Annotations added to the pod
podLabelsobject{}Labels added to the pod
podSecurityContextobject{}Pod-level securityContext
securityContextobject{}Container-level securityContext
service.typestring"ClusterIP"Kubernetes Service type
service.portint80Service port; the container always listens on 11434
ollama.hoststring"0.0.0.0:11434"OLLAMA_HOST inside the pod
ollama.keepAlivestring"1h"How long a loaded model stays in memory after the last request (OLLAMA_KEEP_ALIVE)
ollama.contextLengthint4096Default context window (OLLAMA_CONTEXT_LENGTH); small models on CPU do not need more
models.pulllist[]Tags pulled by a postStart hook once the server answers; the pod is Ready only after every tag is on disk
envlist[]Extra environment variables, in container env entry form
resources.requests.cpustring"1"CPU request
resources.requests.memorystring"2Gi"Memory request
resources.limits.memorystring"4Gi"Memory limit
persistence.enabledbooltrueCreate a PersistentVolumeClaim for /root/.ollama; when false the model directory is an emptyDir
persistence.storageClassstring""StorageClass for the created PVC; empty uses the cluster default
persistence.accessModeslist["ReadWriteOnce"]Access modes for the created PVC
persistence.sizestring"10Gi"Size of the created PVC
persistence.existingClaimstring""Use an existing PVC instead of creating one; when set, no PVC is created by this chart
livenessProbeobjectsee values.yamlLiveness probe, GET /api/version on the http port
readinessProbeobjectsee values.yamlReadiness probe, GET /api/version on the http port
nodeSelectorobject{}Node selector
tolerationslist[]Tolerations
affinityobject{}Affinity rules

Deploy ollama with OpenTenant

Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has ollama on a Hetzner server. Change the host, add apps from the marketplace, then copy the generated files. Providers and prices are samples, and nothing here is sent anywhere.

  1. Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
  2. Place the chartollama is pinned at v0.1.2 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
  3. ApplySave opentenant.yaml and main.tf from the console, then run the commands below.
# opentenant.yaml, main.tf and dns.tf come from the builder below
opentenant validate opentenant.yaml
terraform init && terraform apply