docs(examples): add managed GPU inference codelab - #5968
Open
Ganeshkumar Ashokavardhanan (ganeshkumarashok) wants to merge 1 commit into
Open
Ganeshkumar Ashokavardhanan (ganeshkumarashok) wants to merge 1 commit into
Ganeshkumar Ashokavardhanan (ganeshkumarashok) wants to merge 1 commit into
Conversation
Add a guided, repeatable AKS example for validating managed GPU nodes, staging a model once on shared storage, and serving it privately with two vLLM replicas. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 4393b19f-b77a-4d03-aa95-cfb25e91da35
Ganeshkumar Ashokavardhanan (ganeshkumarashok)
requested review from
a team and
Mitch Connors (therealmitchconnors)
and
a lite review from Copilot
September 16, 2026 17:52
Ganeshkumar Ashokavardhanan (ganeshkumarashok)
requested review from
a team and
Jorge Palma (palma21)
as code owners
September 16, 2026 17:52
Ganeshkumar Ashokavardhanan (ganeshkumarashok)
requested a review
from Qi Ke (qike-ms)
September 16, 2026 17:52
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
Critical cleanup safety issues remain unresolved.
Get a fresh assessment by requesting another Copilot review.
Pull request overview
Adds a self-contained AKS managed GPU inference codelab for serving Qwen with two private vLLM replicas, shared Blob NFS storage, and managed A100 nodes.
Changes:
- Adds guided setup, validation, inference, observability, and cleanup documentation.
- Adds repeatable Azure and Kubernetes automation scripts.
- Adds manifests for GPU checks, model staging, storage, and vLLM serving.
File summaries
| File | Reviewed changes |
|---|---|
examples/managed-gpu-inference-service/scripts/lib.sh |
Shared configuration and ownership helpers |
examples/managed-gpu-inference-service/scripts/90-cleanup.sh |
Workload, pool, and resource cleanup |
examples/managed-gpu-inference-service/scripts/50-deploy-vllm.sh |
vLLM deployment and request validation |
examples/managed-gpu-inference-service/scripts/40-stage-model.sh |
Model download and verification |
examples/managed-gpu-inference-service/scripts/30-verify-gpu.sh |
CUDA and DCGM validation |
examples/managed-gpu-inference-service/scripts/20-create-managed-gpu-pool.sh |
Managed GPU pool setup |
examples/managed-gpu-inference-service/scripts/10-create-cluster.sh |
AKS cluster creation |
examples/managed-gpu-inference-service/scripts/00-preflight.sh |
Environment, feature, SKU, and quota checks |
examples/managed-gpu-inference-service/README.md |
Codelab overview and workflow |
examples/managed-gpu-inference-service/modules/07-cleanup.md |
Cleanup procedures |
examples/managed-gpu-inference-service/modules/06-observability.md |
Metrics guidance |
examples/managed-gpu-inference-service/modules/05-inference-service.md |
vLLM deployment |
examples/managed-gpu-inference-service/modules/04-model-storage.md |
Model staging |
examples/managed-gpu-inference-service/modules/03-verify.md |
GPU validation |
examples/managed-gpu-inference-service/modules/02-managed-gpu-nodepool.md |
Managed GPU pool setup |
examples/managed-gpu-inference-service/modules/01-cluster.md |
CPU cluster setup |
examples/managed-gpu-inference-service/modules/00-prerequisites.md |
Prerequisites and preflight |
examples/managed-gpu-inference-service/manifests/vllm-serving.yaml |
vLLM Deployment, Service, and PDB |
examples/managed-gpu-inference-service/manifests/namespace.yaml |
Dedicated namespace |
examples/managed-gpu-inference-service/manifests/model-storage.yaml |
Blob NFS storage resources |
examples/managed-gpu-inference-service/manifests/model-stage-job.yaml |
Model staging Job |
examples/managed-gpu-inference-service/manifests/gpu-smoke-test.yaml |
GPU validation pod |
Review details
Suppressed comments (3)
examples/managed-gpu-inference-service/modules/05-inference-service.md:20
- A PodDisruptionBudget limits voluntary evictions; it cannot guarantee that one replica is always available during crashes, node loss, or other involuntary failures. Describe this as allowing at most one voluntary disruption so the module does not promise stronger availability than the manifest provides.
- A PodDisruptionBudget with one replica always available.
examples/managed-gpu-inference-service/modules/06-observability.md:8
- The verifier reaches
19400throughhostNetworkandlocalhost, not through a KubernetesNodePortService. Calling this a node port can lead readers to look for a NodePort resource or use the wrong access path; describe it as a node-local port instead.
| DCGM exporter | Node port `19400` | GPU activity, memory, temperature, power, and hardware errors |
examples/managed-gpu-inference-service/scripts/lib.sh:55
version_gecompares only extracted numeric tuples, so the stable19.0.0compares lower than the configured19.0.0b29minimum even though a stable release supersedes that prerelease. Once the preview extension ships that stable version, preflight will incorrectly reject it; parse prerelease/stable ordering explicitly.
def parts(value):
return tuple(int(part) for part in re.findall(r"\d+", value))
raise SystemExit(0 if parts(sys.argv[1]) >= parts(sys.argv[2]) else 1)
- Files reviewed: 22/22 changed files
- Comments generated: 3
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Comment on lines
+56
to
+58
| kubectl delete namespace "$LAB_NAMESPACE" \ | ||
| --ignore-not-found \ | ||
| --wait=true |
Comment on lines
+125
to
+128
| if kubectl "${args[@]}" >/dev/null 2>&1; then | ||
| object_is_owned "$kind" "$name" "$namespace" || | ||
| fail "$kind/$name already exists without the $LAB_OWNER_LABEL=$LAB_OWNER_VALUE label." | ||
| fi |
| app.kubernetes.io/name: vllm | ||
| app.kubernetes.io/part-of: managed-gpu-inference-service | ||
| aks.azure.com/example: managed-gpu-inference-service | ||
| aks.azure.com/example: managed-gpu-inference-service |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this PR adds
This PR adds a guided example for serving
Qwen/Qwen2.5-7B-Instructwith two vLLM replicas on AKS-managed NVIDIA GPU nodes.The codelab covers the complete workflow:
Design and safety
The example keeps the inference Service private and uses
kubectl port-forwardinstead of creating an unauthenticated public endpoint. The scripts are safe to rerun and include ownership markers, subscription-specific kubeconfig contexts, existing-resource compatibility checks, fail-safe cleanup, and useful diagnostics for long-running failures.The serving manifest includes bounded resources, tagged images, startup/readiness/liveness probes, topology spread, a PodDisruptionBudget, and
maxSurge: 0so a rollout does not require a third GPU.This uses the guided codelab structure discussed in #5965, but is self-contained under
examples/managed-gpu-inference-service/.Validation
The documented serving configuration was validated end to end with AKS 1.35, two
Standard_NC24ads_A100_v4nodes,vllm/vllm-openai:v0.28.0, shared Blob NFS model storage, two ready replicas on separate nodes, and successful completion requests.The contribution also passed:
bash -nand ShellCheck for every script.Scope
This example intentionally does not add public ingress, authentication, autoscaling, or multi-region routing. Those production concerns and the preview support limitations are documented in the README.