Skip to content

feat(k8s): minikube gpu detection and dynamic service nodeport reachability fallback #126

Closed

Description

@dan-petty

Problem Statement

In DevContainer environments, devops devcontainer run-lifecycle or devops k8s bootstrap attempts to start Minikube. If the host has an NVIDIA GPU passed into the container, Minikube is not automatically launched with --gpus=all, causing Ollama to run slowly on CPU. Furthermore, service NodePorts (minikube service --url) pointing to Minikube internal IPs (192.168.49.2:<port>) are often unreachable from within specific container network namespaces without localhost port-forwarding.

Proposed Changes

  • Enhance devops k8s bootstrap to detect NVIDIA GPU presence via shutil.which("nvidia-smi") and attempt minikube start --driver=docker --gpus=all, falling back to standard CPU mode.
  • Enhance devops k8s configure-urls with non-blocking socket reachability verification on resolved NodePort URLs.
  • Automatically fall back to localhost port-forwarding (http://localhost:<nodePort>) and persist resolved endpoints when internal Minikube IPs are unreachable.

Acceptance Criteria

  • Automated GPU enablement on Minikube when GPU hardware is detected.
  • 100% reliable endpoint resolution for Grafana, Jaeger, and Ollama in DevContainers.
  • Unit tests in tests/test_k8s_bootstrap.py covering GPU detection and URL reachability fallback.

Metadata

Metadata

Assignees

No one assigned

    Labels

    priority/p1-highscope/k8stype/feature

    Type

    No type

    Projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions