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.
Install
Section titled “Install”brew install alperencelik/tap/ctrlplaneOr 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.
Sign in
Section titled “Sign in”ctrlplane login # https://app.ctrlplane.runYour browser opens to sign in with GitHub. The CLI keeps your tokens, renews them on its own,
and ctrlplane logout deletes them.
Control planes
Section titled “Control planes”ctrlplane listctrlplane create dev --wait # creates <you>-dev and waits until it's readyctrlplane delete dev # asks first; --yes to skipUse one with kubectl
Section titled “Use one with kubectl”ctrlplane use devThis 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>:
ctrlplane apply -f crds/ctrlplane get apis # your CRDsctrlplane controllers # ready, restarts, last exitctrlplane kubectl -- auth whoami # any other kubectl commandctrlplane kubeconfig dev prints the kubeconfig the site downloads, for machines without the CLI.
Controllers
Section titled “Controllers”ctrlplane deploy guestbook --image ghcr.io/you/guestbook:v1 \ --env LOG_LEVEL=debug --memory 128Mi --webhook-port 9443 -- --leader-electctrlplane deploy -f config/manager/manager.yaml # or an install.yaml, or an https:// URLctrlplane controllers # ready, restarts, last exitctrlplane logs guestbook -fctrlplane restart guestbookctrlplane rm guestbookdeploy 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).
Plugins
Section titled “Plugins”Operators that ctrlplane runs for you. See Plugins.
ctrlplane plugins # all plugins, and which are onctrlplane plugin on crossplane-aws-s3 # the API server restarts for a few secondsctrlplane plugin off crossplane-aws-s3 # refused while its resources existThey work on the current control plane, or on --cp <name>.