Skip to content

fix(k8s): gpu placement, exporter privileges and gateway routing for the llm pool #668

Closed

Description

@dan-petty

Summary

Found in the release/v0.2.23 review (line numbers at 7fdaa9d).

  1. The volta pods can stay Pending. The volta node affinity matches only nvidia.com/gpu.architecture (k8s/llm/ollama-volta-1.yaml:33-40). The GPU Feature Discovery DaemonSet this repo ships sets gpu.family, not that label (k8s/gpu-feature-discovery/daemonset.yaml:43). The vLLM manifests accept either label.

  2. Two Ollama workloads share a GPU and a model directory. The volta Deployment is meant to own GPU 1 on the Volta node, but:

    • the ollama StatefulSet pod on the same node still sees every GPU (k8s/llm/ollama.yaml:79-80: NVIDIA_VISIBLE_DEVICES=all);
    • neither pod requests nvidia.com/gpu;
    • both mount the hostPath /var/lib/ollama (ollama.yaml:135-138);
    • neither sets a memory limit, and volta requests only 2Gi.

    Once volta's model unloads, the other pod can put layers on GPU 1, and the next volta load falls back to CPU or runs out of memory. A restart of one pod can also delete the other's in-progress pull.

  3. The DCGM exporter may run with more privilege than documented (unconfirmed: the chart is not vendored or pinned). The values keep the exporter at UID 0 and add drop: [ALL], but do not clear the chart's default capabilities.add: [SYS_ADMIN] (k8s/monitoring/dcgm-exporter-values.yaml:25-31). arguments is not overridden either, so the default DCP counters with profiling fields remain. The file's own comments (:5-8) say the opposite.

  4. The vLLM profiles compete for the same GPUs.

    • vllm-2x24gb ships with replicas: 1, while every other profile is 0 (k8s/llm/profiles/vllm-profiles.yaml:281). kubectl apply -k k8s/llm/profiles then starts a second TP=2 deployment competing with vllm.
    • The profiles lack enableServiceLinks: false, and k8s/llm/vllm/deployment.yaml:31-32 documents that crash.
    • The model-qwen3-coder-30b alias Service selects both vLLM and Ollama pods and exposes both 8000 and 11434 (k8s/llm/profiles/services.yaml:53-71).
  5. The gateway routing works against its own README.

    • devops-review sets max_parallel_requests caps of 64/1/1 together with least-busy routing (k8s/llm/gateway/configmap.yaml:71-98, :133-137). The README (k8s/README.md:85) says caps make requests queue behind the capped deployment.
    • Least-busy ignores weight, so the gateway tune weights have no effect.
    • The config also assumes a fixed StatefulSet ordinal (ollama-2) lives on a particular node, which ordinals do not guarantee.

Remediation Plan

  1. Accept either GPU label in the volta affinity.
  2. Pin each Ollama pod to its GPU with nvidia.com/gpu requests or matching NVIDIA_VISIBLE_DEVICES, give them separate model directories, and set memory limits.
  3. Verify the chart defaults for the pinned chart version. Clear capabilities.add, run non-root if the exporter allows it, and override the counters file to drop profiling fields.
  4. Set vllm-2x24gb to replicas: 0 with enableServiceLinks: false, and split the alias Service by backend port.
  5. Remove the caps, or document why they are needed, and pick a routing strategy that uses the tuned weights. Route by node-pinned Service rather than by ordinal.

Activity

  1. added this to the v0.2.23 milestone on Sep 28, 2026
  2. added
    type/bug
    scope/k8s
    priority/p2-medium
    on Sep 28, 2026
  3. dan-petty commented on Sep 28, 2026

    @dan-petty
    OwnerAuthor

    Resolved by #677 in release/v0.2.23.

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/p2-mediumscope/k8stype/bug

    Type

    No type

    Projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions