The pb CLI
kubectl is the API for App, ManagedPostgres and ManagedValkey — anything pb does, a plain kubectl apply, kubectl get or kubectl delete can do too. pb is a small Go binary that exists for three things kubectl is bad at: a deploy that only bumps the image, a status table across all three kinds plus your own unmanaged objects, and a preview that is several objects at once.
Global flags on every command: --kubeconfig (default: the usual kubeconfig loading rules), --context, -n/--namespace (default: the kubeconfig context’s namespace, else default).
pb app deploy
Section titled “pb app deploy”pb app deploy NAME --image IMAGE [--port PORT] [--plan PLAN] [--wait] [--timeout DURATION]Creates the App if it does not exist, or bumps its spec.image if it does — nothing else in the spec is touched by a bump. --port and --plan only take effect when creating a new App. --wait (default timeout 5 minutes) polls until the App is Ready and prints its URL, or reports the last condition message if it fails.
pb status
Section titled “pb status”pb status [-A|--all-namespaces]One table: every App, ManagedPostgres and ManagedValkey in the namespace (or every namespace with -A), with phase, Ready/Reconciled/Degraded, an endpoint or URL, and the current condition message — plus your own hand-written Knative Services and CNPG Clusters, listed and clearly tagged unmanaged.
pb preview up / pb preview down
Section titled “pb preview up / pb preview down”pb preview up APP --ref REF [--image IMAGE] [--from-prod] [--ttl DURATION] [--wait] [--timeout DURATION]pb preview down APP --ref REFSee preview environments for what gets created and how --from-prod and --ttl behave.
Planned
Section titled “Planned”These are part of the design and not implemented yet:
| Command | What it will do |
|---|---|
pb login / pb use <cluster> | fetch a short-lived kubeconfig and switch context, without a separate download step |
pb app promote <name> [--to PERCENT] | shift spec.traffic for a blue/green rollout, instead of editing it with kubectl |
pb pg restore <name> --at <time> | create a restored ManagedPostgres and print its name, instead of writing restoreFrom by hand |
pb logs | tail the pods behind an App, matched by label |
No command does anything a customer could not write as YAML themselves — pb is a shortcut, never a separate feature surface.