Skip to content

feat(mk8s): add managed Kubernetes commands (experimental) - #81

Draft
yutkin wants to merge 2 commits into
mainfrom
feat/cc-811-mk8s
Draft

yutkin wants to merge 2 commits into
mainfrom
feat/cc-811-mk8s

Conversation

@yutkin

@yutkin yutkin commented Nov 20, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds verda mk8s (aliases k8s, kubernetes) for managed Kubernetes. It is marked experimental.

verda mk8s
├── locations
├── cluster      list · describe · create · upgrade · delete
├── node-pool    list · describe · create · scale · delete     (alias: pool, np)
└── kubeconfig   list · describe · create · save · delete

Every command works on a terminal (pickers and wizards) and in scripts (flags, -o json, --agent). Creates, deletes and scaling accept --wait / --yes where they apply.

# Where can this project create clusters?
verda mk8s locations

# A cluster with one worker, then kubectl access
verda mk8s cluster create --name prod -l FIN-03 --kubernetes-version 1.37.0 \
  --network $NETWORK_ID --subnet $SUBNET_ID --wait
verda mk8s node-pool create --cluster prod --name workers \
  --instance-type 1V100.6V --ssh-key $KEY_ID --wait
verda mk8s kubeconfig create --cluster prod --common-name alice --admin
export KUBECONFIG=~/.kube/verda-prod.alice.yaml
kubectl get nodes

# Inspect
verda mk8s cluster list
verda mk8s cluster describe prod
verda mk8s node-pool list --cluster prod
verda mk8s kubeconfig list --cluster prod

# Change
verda mk8s cluster upgrade prod --kubernetes-version 1.38.0 --yes
verda mk8s node-pool scale workers --cluster prod --replicas 5 --wait
verda mk8s kubeconfig save $KUBECONFIG_ID --cluster prod --file ./prod.yaml

# Clean up
verda mk8s kubeconfig delete $KUBECONFIG_ID --cluster prod --yes
verda mk8s node-pool delete workers --cluster prod --yes
verda mk8s cluster delete prod --yes

Also in this PR: verdacloud-sdk-go v1.9.1, and <, > and & are no longer HTML-escaped in JSON output.

Evidence

  • Before: no verda mk8s command.
    After: make build, make test, make lint and make fix.check pass. The full create → node pool → kubeconfig → kubectl get nodes → delete flow was run against the production API, on a terminal and in agent mode.

Merge Danger

Door: two-way

Blast Radius: new command group

The JSON escaping change touches shared output code, so other commands' JSON now prints <, > and & as is.

🤖 Generated with Claude Code

yutkin and others added 2 commits November 20, 2026 18:21
Add `verda mk8s` (aliases `k8s`, `kubernetes`):

- locations
- cluster: list, describe, create, upgrade, delete
- node-pool: list, describe, create, scale, delete
- kubeconfig: list, describe, create, save, delete

Commands work on a terminal (pickers, wizards) and in scripts (flags,
-o json, --agent). Bump verdacloud-sdk-go to v1.9.1 and stop
HTML-escaping <, > and & in JSON output.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
- Tests consolidated: table-driven tests replace near-duplicates, and checks
  repeated across output modes, YAML variants and --debug dumps are gone.
  The optional refusal tests are dropped. The security guards stay: key never
  printed, O_EXCL, symlink, path traversal and collisions, 0600/0700, and the
  debugTransport round trip.
- Test helpers merged into fake_test.go; unused fake branches and
  apiFailure.Times removed.
- Helpers deduplicated: poolScope.check/connect, apiRun, runWizard, wizard
  step builders, poolCmd, checkPoolFlags, cleanGroups for SSH keys.
- Dead code and restating comments trimmed; errWaitTimeout removed.
- mk8s README.md and CLAUDE.md reconciled with the code and tests.

No CLI behavior change: help text, output, errors, exit codes, API calls and
file modes are the same as before.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant