ollama

by Arktec Quant

Helm chartv1.0.8App 0.18.2Apache-2.0Verified publisher

A production-grade, security-hardened Helm chart by Arktec Quant for Ollama with multi-model serving and GitOps-first configuration. Built with hardened SecOps defaults. Main container aligns with Kubernetes Pod Security Standards (Restricted); init containers run as root for setup tasks. Tracks upstream Ollama 0.18.x (appVersion 0.18.2). Uses CUDA 12.8 image.

About this chart

Ollama Helm Chart

✅ Production-grade build
This chart is hardened for production use and does not include AI developer toolchains.
Only pre-compiled / pre-optimized GGUF format models are supported.

⭐ Follow this chart for updates and security patches!
This chart is actively maintained. We highly recommend following it on Artifact Hub or GitHub to stay informed about new releases, security updates, and important changes. Regular updates are crucial for keeping your AI workloads safe and secure.

🐛 Need Help? Report Issues
If you encounter issues, have feature requests, please report them via our GitHub Issues page:
https://github.com/arktec-quant/public-charts/issues
When reporting issues, please include your Helm chart version, Kubernetes cluster information, relevant logs, and your values.yaml configuration (sanitized of secrets).


A production-grade, security-hardened Helm chart by Arktec Quant for Ollama with multi-model serving, quantisation support, and GitOps-first configuration. Built with hardened SecOps defaults. Main container aligns with Kubernetes Pod Security Standards (Restricted); init containers run as root for setup tasks.

A secure and GitOps-optimized Ollama chart. Supports any community and commercial use cases that Ollama develops. One of the fine-tuned and verified inference backends for Arktec Quant Agentic Fabric's Cortex and Agent runtimes.

Overview

Ollama is a hardened, production-ready Helm chart for deploying Ollama on Kubernetes with advanced capabilities, including:

  • Multi-model serving (load and serve multiple models)
  • Quantisation support (GGUF format)
  • HuggingFace Hub integration (token support for private models and rate limit avoidance)
  • GPU control and auto-detection
  • Configurable logging levels and startup diagnostics
  • Model preloading and management (automatic pull before run)
  • Main container aligned with Kubernetes Pod Security Standards (Restricted)
  • GitOps-first configuration (ArgoCD, Flux)
  • Non-root, read-only filesystem, PVC-backed design
  • Extensible network policies + minimal attack surface
  • Custom-built Ollama image (ghcr.io/arktec-quant/ollama:v0.18.2-cuda-12.8, CUDA 12.8) built from scratch with security hardening and optimizations

Upstream Ollama 0.18.x highlights (default image v0.18.2-cuda-12.8, CUDA 12.8; app/Ollama release v0.18.2):

  • ollama launch for using Ollama models with tools like Claude Code / Codex / OpenCode / Droid (unapplicable)
  • CLI quality-of-life fixes (multi-line strings in ollama run, newline insertion via Ctrl+J / Shift+Enter)
  • ollama launch clawdbot command added in v0.18.2 (unapplicable)
  • New: ollama.contextLength / OLLAMA_CONTEXT_LENGTH to override the default context window size (e.g. 4096, 32768, 131072, or string "0" for Ollama no-limit; chart sets env value 0)

Upstream release notes: ollama/ollama v0.18.2

The chart is designed for enterprise-grade usage, multi-agent workloads, and modern GPU clusters.

Why another Ollama Helm chart?

This is an original Helm chart independently developed by Arktec Quant for deploying Ollama on Kubernetes. While Ollama provides a simple Docker image, this chart is a complete, production-ready solution with comprehensive security hardening, GitOps optimization, and advanced features.

Key Enhancements

Security-hardening:

  • Non-root execution
  • Read-only root filesystem
  • No elevated capabilities
  • Strict allowPrivilegeEscalation: false
  • Pod Security Standards (Restricted) alignment
  • Optional egress lockdown + DNS-only rules
  • PVC-backed temp/cache/model storage
  • NetworkPolicy isolation

Operational upgrades:

  • Multi-model support
  • Environment variable configuration (Ollama uses env vars, not CLI args)
  • GitOps schema validation (values.schema.json)
  • Consistent directory layout for hardened filesystems
  • Health check probes optimized for Ollama

Cluster-friendly:

  • Works on K3s, K8s, AKS, EKS, GKE
  • GPU autoscaling compatible
  • RWO/RWX storage compatible
  • Supports node selectors + tolerations

Design Philosophy

This chart follows six core principles to provide secure, production-ready Ollama deployments:

1. Safe Defaults for All Users

The chart enforces secure defaults to protect users from common configuration mistakes. These defaults include:

  • readOnlyRootFilesystem: true
  • Correct PVC-backed /models directory
  • TMPDIR set to /models/tmp
  • seccomp: RuntimeDefault
  • Dropped capabilities
  • Disabled service account token

These secure defaults protect users from common pitfalls related to GPU scheduling, temp-dir restrictions, model caching, and read-only filesystem implications. This approach aligns with best practices used by quality community charts such as Bitnami, Thanos, Argo Workflows, and Prometheus Operator.

2. Flexibility for Power Users

The chart provides a secure baseline while allowing full customization when needed. Users can:

  • Disable network policies
  • Change security contexts
  • Supply custom GPU configurations
  • Change model cache paths
  • Enable/disable persistence
  • Replace image digest or registry
  • Configure all Ollama environment variables

All security defaults can be overridden, providing flexibility for advanced use cases while maintaining secure-by-default behavior.

3. Proactive Problem Solving

The chart addresses common Ollama deployment issues automatically:

  • Model storage directory requirements
  • Temporary directory requirements
  • GPU reset handling with proper probes
  • Root filesystem write failures in hardened clusters
  • Image registry tag changes affecting reproducibility

These solutions are built into the chart to prevent common deployment failures and reduce troubleshooting time.

4. Universal Portability

The chart is designed to work across different Kubernetes environments:

  • Any CNCF-conformant Kubernetes distribution
  • Managed Kubernetes services (AKS, EKS, GKE)
  • Local development environments
  • Bare-metal and cloud deployments
  • Any cluster with compatible storage provisioner

The PVC-based approach for temporary directories ensures portability across all these environments, regardless of Ollama's storage requirements.

5. Contemporary Kubernetes Security Alignment

The chart implements modern Kubernetes security best practices:

  • PSS: restricted - Pod Security Standards restricted profile
  • Disallow root - Non-root execution enforced
  • No service account auto-token - Token auto-mount disabled
  • RuntimeDefault seccomp - Container runtime security profiles
  • No CAPs - All capabilities dropped
  • Read-only root FS - Immutable filesystem
  • PVC as writable workspace - Persistent volumes for writable data

These security settings align with SIG-Security recommendations and Kubernetes security best practices.

6. Secure Defaults for Production

The chart ships with secure defaults that:

  • Discourage insecure patterns
  • Reduce risk of supply chain tampering
  • Avoid best-practice violations
  • Enable organizations to adopt Ollama safely

These defaults help organizations deploy Ollama in production environments with appropriate security guardrails.

Attribution and Credits

Ollama Project Attribution: This Helm chart is developed and maintained by Arktec Quant and uses the Ollama project. The Ollama inference engine and its codebase are developed and maintained by the Ollama team. We extend our gratitude to the Ollama project contributors for their excellent work on the core inference engine.

Ollama Chart & Image: This Helm chart (ollama) is an original, independently developed chart by Arktec Quant. It is not a fork, copy, or derivative of any official Ollama Helm chart. The chart uses a custom-built Ollama image (ghcr.io/arktec-quant/ollama:v0.18.2-cuda-12.8) that is built from scratch, not derived from the official ollama/ollama Docker image.

Image Build Details:

  • Base Image: Custom-built from scratch (not using official ollama/ollama as base)
  • Security Hardening: Non-root execution, read-only filesystem, minimal attack surface
  • Configuration: All configuration via environment variables (Ollama's design)
  • Version: 0.18.2 (image v0.18.2-cuda-12.8, CUDA 12.8)

The chart itself was built from scratch with a focus on security hardening, GitOps optimization, and production-ready configurations for deploying Ollama on Kubernetes.

License:

  • Ollama project: Licensed under MIT by the Ollama project
  • ollama Helm chart and custom image: Licensed under Apache 2.0 by Arktec Quant (see LICENSE file)

See the NOTICE file for detailed attribution requirements.

Security Features

This chart implements comprehensive security defaults designed to mitigate supply chain risks and provide maximum security guardrails. All security defaults are automatically applied via template defaults, ensuring secure-by-default deployments even without a values.yaml file.

Security Defaults (Applied Automatically)

The chart enforces multiple layers of security by default, reducing the attack surface and preventing common container escape and privilege escalation attacks. These defaults are implemented in the template, providing security-by-default even if values.yaml doesn't specify securityContext.

Container Security Context (Template Defaults):

securityContext:
  runAsNonRoot: true
  runAsUser: 1000
  runAsGroup: 1000
  readOnlyRootFilesystem: true
  allowPrivilegeEscalation: false
  capabilities:
    drop: ["ALL"]
    add: []
  seccompProfile:
    type: RuntimeDefault

Key Security Features:

  1. seccompProfile: RuntimeDefault - Container runtime security profiles for system call filtering
  2. Capabilities drop: ALL - All Linux capabilities explicitly dropped, empty add list
  3. readOnlyRootFilesystem: true - Prevents unauthorized file system modifications
  4. Non-root execution - Runs as user ID 1000 (ollama user) with runAsNonRoot: true

PVC Usage for Writable Paths: The chart uses a PVC for all writable paths:

  • /models → model store (OLLAMA_MODELS)
  • /models/tmp → TMPDIR

If the PVC is disabled, the deployment will fail as intended.

Pod Security Context:

  • fsGroup: Set to 1000 for proper volume ownership (matches ollama user GID)
  • fsGroupChangePolicy: OnRootMismatch to avoid unnecessary chown operations on large PVCs

Pod Security Standards (PSS)

The chart enforces Pod Security Standards (PSS) restricted profile for the main container:

  • PSS Labels: pod-security.kubernetes.io/enforce: restricted (applies to the pod)
  • Main container: Fully compliant with Restricted profile (non-root, read-only root filesystem, no capabilities, seccomp)
  • Init containers: Run as root for setup tasks (fixing permissions, creating directories) - this is a common pattern for init containers that perform initialization
  • Configurable levels: Can be set to baseline or restricted via podSecurityStandards.enforce
  • Host network disallowed: hostNetwork: false enforced
  • Host path volumes disallowed: Prevents hostPath volume mounts

Network Security

NetworkPolicy (Optional, Enabled by Default):

The chart includes an optional NetworkPolicy that provides:

  • Deny-all baseline
  • Allow ingress to port 11434 (Ollama default)
  • Allow DNS egress (restricted to cluster DNS pods only)
  • Block intra-cluster lateral movement
  • DNS Tunneling Prevention: DNS queries are restricted to cluster-managed DNS pods only

Policy Rules:

  • Ingress: Allows traffic on service port only
  • Egress: Blocks cluster-internal communication and private IP ranges
  • Internet access: Allows only HTTPS (443) for external connections
  • DNS resolution: Restricted to cluster DNS pods (kube-dns/coredns in kube-system namespace)

Service Account Security

  • Token auto-mount disabled: automountServiceAccountToken: false by default
  • Minimal RBAC: Optional Role/RoleBinding with only necessary permissions

⚠️ Critical: A PVC must be provided when persistence is enabled. This PVC is used for all model files and temporary working directories. The PVC is mounted at /models and used for:

  • Model storage (OLLAMA_MODELS points to /models)
  • Writable temporary directory (/models/tmp via TMPDIR environment variable)

Deployments without a PVC will fail because Ollama requires a writable directory for models. The chart includes an init container that automatically sets up the /models/tmp directory on the PVC.

Getting Started

Standard Deployment

helm repo add arktecquant https://charts.arktecquant.com
helm install ollama arktecquant/ollama

This deploys Ollama with:

  • Read-only root filesystem
  • Required PVC for models + temp dirs
  • Default secure NetworkPolicy
  • Minimal environment variables
  • Default port 11434

CPU-Only Deployment (Testing/Development)

For CPU-only clusters or testing without GPUs:

helm install ollama arktecquant/ollama\
  --set resources.limits."nvidia.com/gpu"="" \
  --set resources.requests."nvidia.com/gpu"="" \
  --set persistence.enabled=false

Note: CPU-only deployments are significantly slower than GPU-accelerated inference and are recommended only for testing, development, or very small models.

Prerequisites

  • Kubernetes ≥ 1.26
  • Helm 3.2.0+
  • GPU nodes (optional): NVIDIA GPU nodes required for GPU-accelerated inference
    • NVIDIA Container Runtime
    • NVIDIA device plugin installed in your cluster
  • CPU-only deployments: Supported for testing/development (slower performance)
    • Set `resour

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 v1.0.8 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