ChaGPT added lab simulations

This commit is contained in:
Mosiur Rahman
2026-08-27 11:50:09 +06:00
parent eaef1c17a7
commit a89b4ed4c2
16 changed files with 425 additions and 75 deletions

View File

@@ -0,0 +1,17 @@
$ErrorActionPreference = 'Stop'
$distribution = 'Ubuntu-24.04'
& wsl.exe --distribution $distribution --user root --exec bash -lc @'
export KUBECONFIG=/opt/cks-lab/kubeconfig
context="$(kubectl config current-context 2>/dev/null || true)"
if [[ "$context" != "kind-cks-lab" ]]; then
echo "Safety check failed: expected kind-cks-lab, got ${context:-none}." >&2
exit 1
fi
echo "CKS lab: $(kubectl version --output=json | jq -r .serverVersion.gitVersion)"
echo "Context: $context"
exec bash
'@
if ($LASTEXITCODE -ne 0) { throw 'Could not enter the isolated CKS lab.' }