Skip to content

Add optional Run:ai to the Kubernetes path: KAI Scheduler and platform modes - #1425

Merged
michael-balint merged 30 commits into
masterfrom
dholt/26.11-runai-platform
Oct 19, 2026
Merged

michael-balint merged 30 commits into
masterfrom
dholt/26.11-runai-platform

Conversation

@dholt

@dholt dholt commented Oct 17, 2026

Copy link
Copy Markdown
Contributor

Add optional Run:ai to the Kubernetes path: KAI Scheduler mode and platform mode

What this adds

  • playbooks/k8s-cluster/runai.yml and a runai role. Off by default; nothing changes unless you run the playbook.
  • KAI mode: installs the open-source KAI Scheduler (GPU-aware queues and scheduling) on an existing cluster.
  • Platform mode: installs the self-hosted Run:ai control plane and links the cluster to it (certificates, DNS entries for the platform name, cluster registration, API helper).
  • scripts/validation/validate_runai.py: checks either mode. It waits for the scheduler and cluster link, prints only a fixed-vocabulary status summary, creates a throw-away project through the Run:ai API bound to a namespace it creates itself, runs a whole-GPU job, then deletes the project and only that namespace (by UID, never an existing namespace).
  • Docs (docs/k8s-cluster/runai.md), a deploy-runai-kai agent skill, example group_vars, and unit tests (scripts/validation/tests/test_runai.py, tests/runai/).

Testing

  • Local: 82 tests pass in the two Run:ai suites (131 across the branch's validation tests at the final review); ansible-playbook --syntax-check playbooks/k8s-cluster/runai.yml passes; Python compile and YAML parse of all role and playbook files pass; git diff --check clean.
  • Live (platform mode, one A100 test machine, final code): the validator returned ok: true. Cluster showed Connected, scheduler ready, the test project was created through the Run:ai API and bound to the validator's namespace, a whole-GPU job ran, the project was deleted and that namespace removed, uninstall was clean, and the machine was released with nothing left behind.

Known gaps (stated plainly)

  1. Half-GPU sharing is not proven on our GPU stack. The validator reports that check as skipped (--skip-fractions). Fractioning is off by default in platform mode; it needs a newer GPU Operator than we tested.
  2. Hard GPU-memory limits are not available in platform mode on the default GPU stack.
  3. LoadBalancer is untested. Only NodePort was exercised.

Notes for reviewers

  • Merge commits from the two feature branches are kept as-is (no squash).

dholt added 28 commits October 13, 2026 11:13
Off by default (runai_mode: off). Modes: kai, platform (experimental).
Adds playbooks/k8s-cluster/runai.yml, roles/runai, validate_runai.py,
docs/k8s-cluster/runai.md, and the deploy-runai-kai skill.
…platform mode

--create-project creates a project through the Run:ai API, runs the whole-GPU and
half-GPU checks in its namespace with runai-scheduler, and deletes it. ok requires
both create and delete.
…e scheduler and cluster link to come up after an install
…the cluster state field, and reports a safe cluster status summary
…eys and length-bucketed text markers; accepts nested Connected
…t hash so it can be matched offline; ignores spaces/case/underscores in fixed words
…rger reviewed finite word list; docs corrected
…gpu_fractioning is set (the cluster chart enables it by default and it needs GPU Operator >= 26.7.1 + r615)
ensure_namespace now refuses a namespace that already exists, labels the one it
creates, and delete_namespace only removes namespaces this run created.
…plicit

Platform --create-project refuses a pre-existing runai-<name> namespace and only
deletes the namespace after this run created the project.
… create returns the UID; replacement/race regressions
…oject namespace adopted only when Run:ai-labelled
…equire label+creation-time link before GPU jobs
… project to it (requestedNamespace), delete by UID
Comment thread tests/runai/bin/helm Fixed
Comment thread tests/runai/bin/helm Fixed
Comment thread scripts/validation/tests/test_runai.py Fixed
Comment thread roles/runai/filter_plugins/runai.py Fixed
Comment thread roles/runai/files/runai_api.py Fixed
Comment thread tests/runai/bin/helm Fixed
Comment thread tests/runai/bin/helm Fixed
Comment thread roles/runai/filter_plugins/runai.py Fixed
Comment thread scripts/validation/tests/test_runai.py Fixed
@dholt
dholt requested a review from michael-balint October 17, 2026 22:10

@michael-balint michael-balint left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would be good to also add test for LoadBalancer & Gateway API, especially using new implementation since this is where the community is today: https://docs.nvidia.com/run-ai/self-hosted/v3.0/documentation/installation-and-configuration/config/networking/kubernetes-gateway-api.

@michael-balint
michael-balint merged commit d53c0e3 into master Oct 19, 2026
30 checks passed
@dholt

dholt commented Oct 19, 2026

Copy link
Copy Markdown
Contributor Author

Re: review

@michael-balint thanks for the review. Agreed: tracking LoadBalancer and Kubernetes Gateway API coverage in #1426. The plan is to add both exposure options to the Run:ai role, extend the validator so it passes in platform mode with each one, and update the docs to cover both (dropping the "LoadBalancer is untested" note). We're aiming for the 26.11 release and will link the follow-up PR on #1426.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants