skills/use-k3sup/SKILL.md
Provision K3s clusters with k3sup and k3sup-pro on local, Slicer, and remote VMs.
npx skillsauth add slicervm/agent-skills use-k3supInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Use this skill when the user asks for:
slicer vm exec, slicer vm shell, slicer vm cp) over SSH when the VM is local.slicer vm shell once and keep state there.sudo; do not default to root shells (--uid 0) unless explicitly requested.k3sup install --local from that VM.--host / --ip), always make SSH identity explicit (--ssh-key) and run from your current host.k3sup-pro, run from a host with SSH access to the target VMs, not inside the target VM.--ssh-key using a raw public key string (from $(cat ~/.ssh/id_ed25519.pub)), or use --import-user to import keys by GitHub username.slicer-1 unless the user explicitly requests it.sbox host group (for example, slicer vm add sbox ...).arkade first:curl -SLs https://get.arkade.dev | bash
# If command write permissions are restricted, run with sudo:
curl -SLs https://get.arkade.dev | sudo bash
arkade get k3sup
arkade get kubectl
arkade is preinstalled by default, so use it directly:arkade get k3sup
arkade get kubectl
k3sup or kubectl is not present, install them from arkade rather than downloading release archives manually.k3sup-pro, start by installing k3sup-pro with k3sup get pro from the control host (not from target nodes).--help)k3sup --help
k3sup commandscompletionget (download helpers)get-configinstalljoinnode-tokenplanproreadyupdateversionhelpk3sup pro helper pathk3sup get pro --help
k3sup get pro
k3sup get pro installs k3sup-pro.
/usr/local/bin/--path, --version, --helpImportant: k3sup-pro is typically used from your workstation or control host over SSH to slicer-hosted VMs.
k3supk3sup install --help
k3sup join --help
k3sup plan --help
k3sup get-config --help
k3sup node-token --help
k3sup ready --help
k3sup version --help
k3sup install
--local--host / --ip--user (default root)--ssh-key--ssh-port--k3s-channel, --k3s-version--cluster--token (HA datastore token)--datastore--k3s-extra-args--ipsec--tls-san--no-extras--merge--local-path--context--skip-install--print-command--sudok3sup join
--host / --ip--user--server-host / --server-ip--server-user--server-url--server--server-ssh-port--node-token / --node-token-path--server-data-dir--k3s-channel, --k3s-version--k3s-extra-args--no-extras--skip-install--print-commandk3sup plan
hosts.json--servers--limit--user--ssh-key--context--merge--local-path--agent-k3s-extra-args--server-k3s-extra-args--tls-san--k3s-channel, --k3s-versionk3sup get-config
--local--host / --ip--user--ssh-key--ssh-port--local-path--context--merge--print-command--sudok3sup node-token
--host / --ip--user--local--ssh-key--ssh-port--server-data-dir--print-command--sudok3sup ready
--kubeconfig--context--attempts--pause--quietk3sup update
k3sup-prok3sup-pro --help
k3sup-pro plan --help
k3sup-pro apply --help
k3sup-pro install --help
k3sup-pro join --help
k3sup-pro get-config --help
k3sup-pro node-token --help
k3sup-pro exec --help
k3sup-pro activate --help
k3sup-pro ready --help
k3sup-pro uninstall --help
k3sup-pro version --help
k3sup-pro plan
devices1.json devices2.json ...--servers--limit--user--ssh-key--ssh-port--parallel--output (table/json/yaml)--plan-file--datastore--token--context--local-path--server-extra-args--agent-extra-args--label / --server-label / --agent-label--tls-san--k3s-channel, --k3s-version--ipsec--svclb--traefik--update--dry-run--verbosek3sup-pro apply
plan-file (default plan.yaml)--dry-run--force--predownload--print-command--update--verbose--servers and --user are plan-only flags for k3sup-pro; do not pass them to k3sup-pro apply.
Note: k3sup-pro apply uses SSH settings from the plan file (user, ssh_key, ssh_port) and should still succeed even when the terminal SSH agent has no keys, as long as the plan includes --ssh-key.
If apply still reports handshake failed: unable to authenticate [none publickey]:
ssh_key path and username for the target host;ssh -i <key> <user>@<ip> 'echo ok';SSH_AUTH_SOCK=.k3sup-pro install
k3sup install, plus --cluster for embedded etcd flow.k3sup-pro join
k3sup join.k3sup-pro get-config
devices*.json or plan.yaml--local--host / --ip--user--ssh-key--ssh-port--context--local-path--merge--print-command--sudok3sup-pro node-token
k3sup node-token plus plan/host driven flows via args.k3sup-pro exec
plan.yaml or devices*.json--servers / --agents--parallel--user--ssh-key--ssh-port--verbosek3sup-pro activate
--access-token to activate subscription/license.k3sup-pro ready
k3sup ready.k3sup-pro uninstall
devices*.json or plan.yaml--parallel--user--ssh-key--ssh-port--dry-run--verboseSingle-node on a Slicer VM (in-VM path)
k3sup install --local --k3s-version v1.31.2+k3s1 --context default
k3sup get-config --local --local-path kubeconfig
k3sup ready
Remote VM using SSH from host
slicer vm add sbox --tag workflow=k3s \
--ssh-key "$(cat ~/.ssh/id_ed25519.pub)"
k3sup install --host <VM_IP> --user ubuntu --ssh-key ~/.ssh/id_ed25519
k3sup get-config --host <VM_IP> --user ubuntu --ssh-key ~/.ssh/id_ed25519
k3sup ready --kubeconfig kubeconfig
HA cluster with k3sup-pro
[
{"hostname": "node-1", "ip": "192.168.128.102"},
{"hostname": "node-2", "ip": "192.168.128.103"},
{"hostname": "node-3", "ip": "192.168.128.104"}
]
k3sup get pro
k3sup-pro plan devices.json --servers 3 --user ubuntu --ssh-key ~/.ssh/id_ed25519 > plan.yaml
k3sup-pro apply plan.yaml
k3sup-pro get-config plan.yaml --user ubuntu --ssh-key ~/.ssh/id_ed25519
k3sup-pro ready --kubeconfig ./kubeconfig
On slicer-mac, if k3sup-pro is needed and only one VM is available, use a single-entry devices file derived from slicer vm list --json:
slicer vm list --json | jq 'map({hostname, ip})' > devices.json
k3sup get pro
k3sup-pro plan devices.json --servers 1 --user ubuntu --ssh-key ~/.ssh/id_ed25519 > plan.yaml
k3sup-pro apply plan.yaml
On environments where k3sup-pro still fails with handshake failed: unable to authenticate [none publickey], run under an SSH agent-backed session and try again:
ssh-agent bash -c '
ssh-add ~/.ssh/id_ed25519
k3sup-pro plan devices.json --servers 1 --user ubuntu --output yaml > /tmp/plan.yaml
k3sup-pro apply /tmp/plan.yaml
'
If it still fails with the same handshake error, verify host key auth first:
ssh -vvv -i ~/.ssh/id_ed25519 -o PreferredAuthentications=publickey ubuntu@<VM_IP> 'echo ok'
k3sup-pro requires a valid license context for plan/apply. If k3sup-pro returns:
invalid license, error: JWT parse error: token has invalid claims: token is expired
refresh licensing first:
k3sup-pro activate --access-token /path/to/access-token
Then rerun k3sup-pro plan ... and k3sup-pro apply ....
k3sup-pro should not be launched from inside target VMs; it orchestrates SSH sessions and should run from the control host.
development
Use Slicer to launch Linux microVMs for sandboxed builds, E2E tests, Docker, CI, and isolated dev environments — works from macOS and Linux hosts
development
Move a git worktree or repository into a Slicer microVM with a working, self-contained .git — push code in with `slicer wt push`, let a VM or coding agent work, then pull commits back. The recommended way to put a git project into an agent sandbox.
development
Filter, audit, and inject secrets into HTTP(S) egress from Slicer microVMs with Slicer Proxy — default-deny allow rules, credential injection (Bearer, Basic, OAuth for Claude/Codex/Copilot/xAI), audit and passthrough modes — on Linux and macOS.
tools
Install and run RustFS (S3-compatible object storage in Rust) in a Slicer VM, and talk to it with any S3 client (boto3, aws-cli, mc)