Existing-cluster quickstart
This walkthrough starts with an already-existing Kubernetes cluster. kasim does not create, upgrade, stop, or delete that cluster. Lifecycle commands use an explicit kubeconfig and context; the read-only kasim ui command defaults to kubectl's kubeconfig loading rules and current context.
The target must be Kubernetes 1.30–1.36. Use scheduling throughout that range. Use dra-control-plane only on 1.34–1.36.
1. Build or unpack the CLI
From a source checkout:
go build -trimpath -o ./dist/kasim ./cmd/kasim
./dist/kasim version -o json
./dist/kasim --helpFor a published release, verify the archive before unpacking it as described in Release verification.
The matching controller image and Helm chart are published through GitHub Packages:
docker pull ghcr.io/linkmaq/kube-accelerator-sim-controller:0.5.3
helm pull oci://ghcr.io/linkmaq/charts/kasim-runtime --version 0.5.32. Inspect and compile offline
Catalog inspection and client dry-run do not contact Kubernetes:
./dist/kasim profile list -o json
./dist/kasim profile show nvidia -o json
./dist/kasim apply -f ./examples/single-node-single-accelerator.yaml \
--dry-run=client \
-o jsonThe compile receipt contains the canonical Scenario digest, catalog digest, and exact resolved profile revision/digest. Treat a profile digest change as a reviewable input change.
3. Install the shared runtime
Create the namespace only if it does not already exist, then install the chart. Both tools target the same explicit kubeconfig and named context:
kubectl --kubeconfig ./target.kubeconfig --context target \
create namespace kasim-system
helm upgrade --install kasim-runtime ./charts/kasim-runtime \
--kubeconfig ./target.kubeconfig \
--kube-context target \
--namespace kasim-system \
--waitFor a published release, replace the local chart path with the immutable OCI package and pin its version:
helm upgrade --install kasim-runtime \
oci://ghcr.io/linkmaq/charts/kasim-runtime \
--version 0.5.3 \
--kubeconfig ./target.kubeconfig \
--kube-context target \
--namespace kasim-system \
--waitCheck the exact release and controller rollout:
helm status kasim-runtime \
--kubeconfig ./target.kubeconfig \
--kube-context target \
--namespace kasim-system
kubectl --kubeconfig ./target.kubeconfig --context target \
--namespace kasim-system \
rollout status deployment/kasim-runtime-kasim-runtime-controller
kubectl --kubeconfig ./target.kubeconfig --context target \
--namespace kasim-system \
rollout status deployment/kasim-runtime-kasim-runtime-telemetryInstallation is intentionally separate from kasim apply. The CLI never invokes Helm and never installs cluster-wide runtime resources implicitly.
4. Submit and inspect a Scenario
Submit the example and retain the machine-readable receipt:
./dist/kasim apply -f ./examples/single-node-single-accelerator.yaml \
--kubeconfig ./target.kubeconfig \
--context target \
-o json | tee apply-receipt.json
./dist/kasim status single-node-single-accelerator \
--kubeconfig ./target.kubeconfig \
--context target \
--watch \
-o json | tee status-receipt.jsonInspect only the Scenario's labeled Synthetic Nodes:
kubectl --kubeconfig ./target.kubeconfig --context target \
get nodes \
-l simulation.kasim.io/scenario=single-node-single-accelerator \
-o wideThe status receipt is authoritative for readiness, desired/observed generation, instance UID, resolved profiles, fidelity surfaces, diagnostics, and owned-object counts.
Forward the default read-only Prometheus endpoint to inspect the simulated native metric schemas for those Nodes:
kubectl --kubeconfig ./target.kubeconfig --context target \
--namespace kasim-system \
port-forward service/kasim-runtime-kasim-runtime-telemetry 9400:9400
curl --fail http://127.0.0.1:9400/metricsSee Simulated vendor Prometheus telemetry for evidence coverage, ServiceMonitor discovery, labels, and value semantics.
Open the local read-only inventory when you need a fast visual check across both Kasim and non-Kasim Nodes:
./dist/kasim ui --open
./dist/kasim ui --helpSee the cluster inventory UI guide for its ephemeral capability, evidence rules, filters, and partial-source behavior.
5. Apply typed health and scale revisions
Copy the exact instanceUID and current desiredGeneration from the latest status receipt. Do not reuse values from another target or Scenario:
INSTANCE_UID='replace-with-exact-status-instance-uid'
GENERATION='replace-with-exact-positive-desired-generation'
./dist/kasim health single-node-single-accelerator \
--group workers \
--pool accelerator \
--healthy 0 \
--instance-uid "$INSTANCE_UID" \
--expected-generation "$GENERATION" \
--kubeconfig ./target.kubeconfig \
--context target \
-o jsonFetch status again and copy its new generation before the next mutation:
./dist/kasim status single-node-single-accelerator \
--kubeconfig ./target.kubeconfig \
--context target \
-o json
./dist/kasim scale single-node-single-accelerator \
--group workers \
--replicas 3 \
--instance-uid "$INSTANCE_UID" \
--expected-generation 'replace-with-new-positive-generation' \
--kubeconfig ./target.kubeconfig \
--context target \
-o jsonhealth and scale create typed Scenario revisions. They do not patch Nodes directly and do not evict bound Pods.
6. Delete the exact Scenario safely
Fetch one final status receipt, then use its exact UID and generation:
./dist/kasim delete single-node-single-accelerator \
--instance-uid 'replace-with-exact-status-instance-uid' \
--expected-generation 'replace-with-exact-positive-generation' \
--kubeconfig ./target.kubeconfig \
--context target \
-o json | tee delete-receipt.jsonDeletion closes scheduling and removes only allowlisted objects proven to be owned by that exact instance UID. If an unowned Pod is bound to a Synthetic Node, deletion returns CleanupBlocked; follow the safe process in Troubleshooting and security. There is no force or wildcard deletion.
Confirm the exact Scenario label no longer selects a Node:
kubectl --kubeconfig ./target.kubeconfig --context target \
get nodes \
-l simulation.kasim.io/scenario=single-node-single-accelerator7. Uninstall the shared runtime separately
Delete all Scenario Instances safely before uninstalling the shared runtime. Then uninstall only the Helm release:
helm uninstall kasim-runtime \
--kubeconfig ./target.kubeconfig \
--kube-context target \
--namespace kasim-system \
--waitThe chart retains its CRDs and does not delete the namespace, Scenario Instances, user workloads, unrelated KWOK objects, or the Kubernetes cluster. Only remove a dedicated namespace after independently confirming that it contains nothing else you need.
