Step 1 — Cluster Verification
Goal: Confirm prerequisites are met, validate the cluster connection, and inventory available nodes and GPUs.
Prerequisites
Verify required CLI tools are available before proceeding:
# Check all required tools are installed
for tool in kubectl make curl; do
command -v "$tool" >/dev/null 2>&1 && echo "✓ $tool found" || echo "✗ $tool NOT FOUND — install before continuing"
doneSee powershell-notes.md for the PowerShell equivalent.
If any tool is missing, STOP and tell the user which tools to install before continuing.
Cluster Connection
# Confirm active context
kubectl config current-context
# Inventory all nodes
kubectl get nodes -o wideGPU Detection
# Extract GPU count and model per node (requires NVIDIA device plugin labels)
kubectl get nodes -o jsonpath='{range .items[*]}{.metadata.name}{"\t"}{.status.allocatable['\''nvidia.com/gpu'\'']}{"\t"}{.metadata.labels['\''nvidia.com/gpu.product'\'']}{"\n"}{end}'Note: The above command relies on
nvidia.com/gpu.productnode labels, which are set by the NVIDIA device plugin or GPU operator. If the output shows empty GPU fields, try the fallback:# Fallback: check node descriptions for GPU capacity kubectl describe nodes | grep -A 5 "Allocatable:" | grep -i nvidiaIf neither approach shows GPUs but you know the nodes have GPU hardware, the NVIDIA device plugin may not be installed yet. Guide the user to install it before proceeding.
Report to user:
- Cluster context name
- Total node count and GPU node count
- Per GPU type: model, count, VRAM per card, total cluster VRAM
Decision logic:
- No kubeconfig context → STOP. Tell user to configure
kubeconfig(e.g.,az aks get-credentials) and retry. - No GPU nodes detected → Note "CPU-only cluster" and proceed; CPU-only inference is available via KAITO + llama.cpp.