kubectl-nv

module
v0.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 14, 2026 License: Apache-2.0

README

NVIDIA kubectl-nv

kubectl nv is a kubectl plugin for the people who operate NVIDIA GPU clusters. It runs on your machine with the kubeconfig and the RBAC you already have, installs nothing in the cluster, and works on any distribution where the NVIDIA GPU Operator is deployed. It never changes Kubernetes objects: today it collects the diagnostic bundle that support asks for, so you do not have to run the troubleshooting commands and the must-gather script by hand. Collecting that bundle runs nvidia-bug-report.sh inside the driver pods, which needs permission to create pods/exec.

Install

Download a binary from the GitHub release page, verify it against the checksums file, and put kubectl-nv on your PATH so that kubectl nv resolves. Full instructions, including building from source, are in docs/installation.md.

Commands

kubectl nv adm must-gather

Collects the information from your cluster that is most likely needed for debugging issues.

kubectl nv adm must-gather --artifacts-dir /tmp/support
OPTIONS:
   --kubeconfig value, -k value  path to kubeconfig file (default: "-") [$KUBECONFIG]
   --artifacts-dir value         path to the directory where the artifacts will be stored. Defaults to /tmp/nvidia-gpu-operator_<timestamp> [$ARTIFACT_DIR]
   --help, -h                    show help

Roadmap

What is planned for the next six months, milestone by milestone, is in ROADMAP.md.

Documentation

Testing

End-to-end tests against Mokka, which runs the GPU Operator on simulated GPUs, are planned; see ROADMAP.md.

License

Licensed under the Apache License, Version 2.0. See LICENSE.

Directories

Path Synopsis
cmd
kubectl-nv command
pkg
cmd
Package cmd holds what every kubectl-nv command needs before it can talk to a cluster: the kubectl configuration flags, the resolved kubeconfig path, and the factory the commands get their clients from.
Package cmd holds what every kubectl-nv command needs before it can talk to a cluster: the kubectl configuration flags, the resolved kubeconfig path, and the factory the commands get their clients from.
cmd/adm
Package adm carries the admin-level operations on the NVIDIA resources of a cluster.
Package adm carries the admin-level operations on the NVIDIA resources of a cluster.
cmd/debug
Package debug implements "kubectl nv debug <node>": a must-gather narrowed to one node, with a summary of that node on one screen.
Package debug implements "kubectl nv debug <node>": a must-gather narrowed to one node, with a summary of that node on one screen.
cmd/info
Package info implements "kubectl nv info <node>", everything kubectl-nv knows about one GPU node.
Package info implements "kubectl nv info <node>", everything kubectl-nv knows about one GPU node.
cmd/list
Package list implements "kubectl nv list", the inventory of a cluster's GPU nodes.
Package list implements "kubectl nv list", the inventory of a cluster's GPU nodes.
cmd/mcp
Package mcp serves the kubectl-nv command tree as a Model Context Protocol server over stdio, one tool per read-only leaf command.
Package mcp serves the kubectl-nv command tree as a Model Context Protocol server over stdio, one tool per read-only leaf command.
cmd/root
Package root builds the kubectl-nv command tree.
Package root builds the kubectl-nv command tree.
cmd/schema
Package schema carries the schema command, which prints the JSON Schema of one kubectl-nv kind, and the generator behind "make schema" that keeps the checked-in copies of those schemas in step with the code.
Package schema carries the schema command, which prints the JSON Schema of one kubectl-nv kind, and the generator behind "make schema" that keeps the checked-in copies of those schemas in step with the code.
debug
Package debug holds the report "kubectl nv debug <node>" prints: one node as the inventory sees it, next to the must-gather bundle collected for it.
Package debug holds the report "kubectl nv debug <node>" prints: one node as the inventory sees it, next to the must-gather bundle collected for it.
health
Package health holds the rule contract behind gpu health: what a rule may read, what it returns, and the registry that collects them.
Package health holds the rule contract behind gpu health: what a rule may read, what it returns, and the registry that collects them.
inventory
Package inventory holds the model of a GPU capable node: one flat type that every read-only command shares, built from node labels, node status and the GPU operator's pods.
Package inventory holds the model of a GPU capable node: one flat type that every read-only command shares, built from node labels, node status and the GPU operator's pods.
output
Package output carries the machine readable output contract of kubectl-nv: the API version and kinds every command stamps its output with, the printers behind -o, the exit code mapping, a stderr logger, and a deterministic order for findings.
Package output carries the machine readable output contract of kubectl-nv: the API version and kinds every command stamps its output with, the printers behind -o, the exit code mapping, a stderr logger, and a deterministic order for findings.
source
Package source is the single read path for every read-only command.
Package source is the single read path for every read-only command.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL