Skip to content

fix(k8s): review pod restarts, eliminate cgroup oom kills, and optimize workload resource limits #135

Closed

Description

@dan-petty

Problem Statement

Pods across nodes have experienced terminations and restarts (e.g. Ollama daemonset 8 restarts on workhorse and 1 on condor, node exporter restarts). Ollama currently has a hard memory limit of 24Gi in k8s/llm/ollama-daemonset.yaml. On workhorse (31Gi total RAM), memory spikes during model loading and caching trigger containerd/Linux OOM kills (exit code 255), while on condor (64Gi RAM) it artificially restricts memory. Furthermore, Ollama's liveness probe timeout (5s with 3 failure threshold) causes premature pod restarts during heavy inference or model loading. Additional core workloads (ArgoCD, Valkey, Jaeger, Registry) have overly restrictive memory limits.

Proposed Architectural Solution

  1. Ollama DaemonSet Resource Optimization: Remove hard pod memory limit (leaving requests at 3000m CPU and 8Gi RAM), allowing Ollama to burst dynamically into available node RAM without cgroup OOM kills.
  2. Ollama Probe Hardening: Add a generous startupProbe (failureThreshold 60, period 5s) and relax livenessProbe (timeout 10s, period 15s, failureThreshold 6) so inference spikes and model loading do not trigger kubelet container restarts.
  3. Workload Limit Tuning:
    • ArgoCD (controller 2Gi, repo-server 2Gi, server 1Gi, redis 1Gi)
    • Valkey: Raise limit to 2Gi
    • Jaeger: Raise limit to 2Gi
    • Registry: Raise limit to 2Gi
    • Squid / Exporter: Raise limits to 16Gi / 256Mi
  4. Live Cluster Application: Apply updated manifests directly to the cluster to stabilize running workloads.

Acceptance Criteria

  • Pod restart history and root causes identified (node reboot due to sda mount failure + memory limits / probe timeouts).
  • Memory limits removed from Ollama DaemonSet; probes hardened with startupProbe.
  • Memory limits raised across ArgoCD, Valkey, Jaeger, Registry, and Squid.
  • Changes applied to live cluster.
  • Tests and CI quality gates passing.

Activity

  1. added this to the v0.2.16 milestone on Sep 10, 2026
  2. added
    type/bug
    scope/k8s
    priority/p1-high
    status/in-progress
    on Sep 10, 2026
  3. added a commit that references this issue on Sep 11, 2026
    7f17aa5
  4. dan-petty commented on Sep 11, 2026

    @dan-petty
    OwnerAuthor

    Resolved by squash-merge of PR #136 into release/v0.2.16.

  5. added a commit that references this issue on Sep 12, 2026
    2ed28d4
  6. removed
    status/in-progress
    on Oct 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    priority/p1-highscope/k8stype/bug

    Type

    No type

    Projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions