Skip to content

The ctrlplane CLI

ctrlplane does what the site does, from your terminal. Installed as kubectl-ctrlplane, it’s also a kubectl plugin: kubectl ctrlplane list.

Terminal window
brew install alperencelik/tap/ctrlplane

Or download a binary from the latest release, or go install github.com/alperencelik/ctrlplane-cli/cmd/ctrlplane@latest. It needs kubectl on your PATH, but not kubelogin.

Terminal window
ctrlplane login # https://app.ctrlplane.run

Your browser opens to sign in with GitHub. The CLI keeps your tokens, renews them on its own, and ctrlplane logout deletes them.

Terminal window
ctrlplane list
ctrlplane create dev --wait # creates <you>-dev and waits until it's ready
ctrlplane delete dev # asks first; --yes to skip
Terminal window
ctrlplane use dev

This adds the control plane to your kubeconfig and switches to it, so plain kubectl works without signing in again. The CLI can also run kubectl for you, on the current control plane or --cp <name>:

Terminal window
ctrlplane apply -f crds/
ctrlplane get apis # your CRDs
ctrlplane controllers # ready, restarts, last exit
ctrlplane kubectl -- auth whoami # any other kubectl command

ctrlplane kubeconfig dev prints the kubeconfig the site downloads, for machines without the CLI.

Terminal window
ctrlplane deploy guestbook --image ghcr.io/you/guestbook:v1 \
--env LOG_LEVEL=debug --memory 128Mi --webhook-port 9443 -- --leader-elect
ctrlplane deploy -f config/manager/manager.yaml # or an install.yaml, or an https:// URL
ctrlplane controllers # ready, restarts, last exit
ctrlplane logs guestbook -f
ctrlplane restart guestbook
ctrlplane rm guestbook

deploy sends what the site’s form does, and deploying a name again updates it. With -f, the fields come from your operator’s Deployment; flags given too win over it. For a private image, pipe the token in: --registry-user you --registry-password-stdin. Metrics elsewhere than :8080/metrics: --metrics-port 8443 --metrics-https (a Deployment’s kubebuilder flags set these for you).

Operators that ctrlplane runs for you. See Plugins.

Terminal window
ctrlplane plugins # all plugins, and which are on
ctrlplane plugin on crossplane-aws-s3 # the API server restarts for a few seconds
ctrlplane plugin off crossplane-aws-s3 # refused while its resources exist

They work on the current control plane, or on --cp <name>.