con un clic
k8s-launch-kit-shared
// k8s-launch-kit (l8k) CLI: Shared patterns for binary location, global flags, output formatting, exit codes, and error handling. Read this before using any other k8s-launch-kit skill.
// k8s-launch-kit (l8k) CLI: Shared patterns for binary location, global flags, output formatting, exit codes, and error handling. Read this before using any other k8s-launch-kit skill.
| name | k8s-launch-kit-shared |
| version | 1.0.0 |
| description | k8s-launch-kit (l8k) CLI: Shared patterns for binary location, global flags, output formatting, exit codes, and error handling. Read this before using any other k8s-launch-kit skill. |
# Build and install (production — copies binary + profiles)
make build && sudo scripts/install.sh
# Development (symlinks into source tree)
make build && scripts/install.sh --dev-env
| Path | Contents |
|---|---|
/usr/local/bin/l8k | CLI binary (on PATH) |
/usr/local/share/l8k/profiles/ | Go template profiles |
/usr/local/share/l8k/presets/ | Topology presets (per (machineType, gpuType) directories) |
/usr/local/share/l8k/l8k-config.yaml | Default config |
After installation, l8k is available system-wide.
CRITICAL — follow these steps exactly:
which l8k in a single Bash call. If it returns a path, use it. Done.which l8k fails (exit code 1), tell the user l8k is not installed. Point them to: make build && sudo scripts/install.sh. Stop — do not proceed.find or ls commands| Command | Description |
|---|---|
l8k discover | Discover cluster hardware and produce cluster-config.yaml |
l8k generate | Generate Kubernetes YAML manifests from config + profile (use --for <preset> to skip cluster discovery for known SKUs) |
l8k preset list | List bundled topology presets (directory + machineType + gpuType) |
l8k preset update | Download latest topology presets from GitHub |
l8k sosreport | Collect diagnostic dump from cluster |
l8k schema | List all capabilities as JSON (profiles, flags, exit codes) |
l8k version | Print version information |
The root command l8k --discover-cluster-config ... still works for backward-compatible full-pipeline usage.
| Flag | Description |
|---|---|
--kubeconfig <PATH> | Path to kubeconfig file (optional — falls back to $KUBECONFIG env var) |
--user-config <PATH> | Path to user-supplied l8k-config.yaml |
--output <FORMAT> | Output format: text (default), json |
--yes / -y | Auto-confirm all prompts (root command only — not available on subcommands; --output json auto-confirms) |
--quiet / -q | Suppress informational output (errors still shown) |
--network-operator-namespace <NS> | Override network operator namespace (default: nvidia-network-operator) |
--pod-namespace <NS> | Namespace for pods and network resources (default: default) |
--node-selector <LABELS> | Restrict to nodes matching labels (comma-separated, ANDed) |
--image-pull-secrets <NAMES> | Image pull secret names for NicClusterPolicy (comma-separated) |
RULE: AI agents MUST always use --output json 2>/dev/null when calling any l8k subcommand. Never use text mode — it produces unstructured output with spinners and ANSI codes that is hard to parse.
Do NOT use --yes with subcommands — it only exists on the root command and will cause "unknown flag" errors. --output json already auto-confirms all prompts (no interactive input needed).
# Correct
l8k discover --output json 2>/dev/null
l8k generate --output json 2>/dev/null
# WRONG — --yes is not a valid flag on subcommands
l8k discover --output json --yes 2>/dev/null
JSONResult) at completionjq for downstream processing: l8k discover ... --output json 2>/dev/null | jq .success| Code | Meaning |
|---|---|
0 | Success |
1 | General/unknown error |
2 | Validation error — bad flags, missing required arguments, or invalid config |
3 | Cluster error — kubeconfig invalid, API unreachable, missing CRDs, no NVIDIA NICs |
4 | Deployment error — apply failed |
5 | Partial success — discovery ok but deploy failed |
{
"success": false,
"phase": "discover",
"deployed": false,
"error": {
"code": "CLUSTER_ERROR",
"message": "cluster discovery failed",
"category": "cluster",
"transient": true,
"suggestion": "Check that kubeconfig is valid and the cluster is reachable"
},
"messages": [...]
}
Error categories: validation, cluster, deployment. The transient field
hints whether retrying might help.
# List all l8k capabilities as JSON
l8k schema
Use l8k schema to programmatically discover available profiles, fabrics,
deployment types, flags, exit codes, and output formats.
--deploy on a production cluster--dry-run for destructive operationsBoth nvidia-network-operator and network-operator are common default namespaces. If l8k fails with "no pods found", the error message will suggest using --network-operator-namespace to specify the correct namespace.
When the user does not specify a namespace and discovery fails:
--network-operator-namespace <correct-namespace>Use this skill when the user wants to generate Kubernetes YAML manifests for NVIDIA networking deployment using k8s-launch-kit (l8k). Activate for: manifest generation, profile selection, choosing between SR-IOV/host-device/RDMA-shared/IPoIB/MacVLAN/Spectrum-X, creating deployment files, or when the user asks 'which profile should I use' or needs help choosing a network configuration.
Use this skill when the user needs help understanding, creating, or editing a k8s-launch-kit (l8k) configuration file (l8k-config.yaml or cluster-config.yaml). Activate for: config file questions, parameter tuning, subnet configuration, NV-IPAM setup, DOCA driver settings, NIC configuration operator settings, changing MTU, VFs, resource names, or understanding what any config field does.
Use this skill when the user wants to discover their Kubernetes cluster's network hardware capabilities using k8s-launch-kit (l8k). Activate for: cluster discovery, hardware detection, NIC detection, finding what GPUs or NICs are in a cluster, creating a cluster config file, or when the user says 'discover' in the context of l8k or NVIDIA networking.
Use this skill when the user wants to verify that an NVIDIA networking deployment matches the configuration that produced it. Activate for: 'is my deployment correct', 'are all the manifests applied', 'does the network operator version match', 'verify deployment', 'check cluster state against config', or any question about whether the cluster reflects what l8k generated. Wraps the `l8k validate` subcommand.
Embody a senior NVIDIA Networking Engineer who is an expert on deploying cloud-native networking on Kubernetes with k8s-launch-kit (l8k). Activate whenever the user mentions NVIDIA network profiles, SR-IOV, RDMA, Spectrum-X, BlueField, ConnectX, NIC configuration, Network Operator, DOCA drivers, multirail networking, l8k, k8s-launch-kit, or any Kubernetes networking topic involving NVIDIA hardware. Also activate when the user asks general questions about high-performance networking, GPU interconnect, or RDMA configuration.
Use this skill when the user wants to deploy generated NVIDIA networking manifests to a Kubernetes cluster using k8s-launch-kit (l8k). Activate for: applying manifests, deploying to cluster, the `l8k deploy` subcommand or the legacy --deploy flag on `l8k generate`, applying generated files, or any mention of pushing l8k output to a live cluster. Even if the user just says 'apply these' or 'push to cluster' after generating manifests, use this skill.