Skip to content

kx rollout

Runs a rollout action on a Deployment, StatefulSet, or DaemonSet. status streams live and blocks until the rollout settles; the other actions run and return immediately.

kubectl’s own flags pass through, which is how undo reaches a particular revision: --to-revision, --revision for history, --timeout for status.

A flag kx doesn’t know is refused; put it after -- to pass it through to kubectl.

Usage

kx rollout [OPTIONS] <action> <index> [kubectl flags]

Arguments

ArgumentDescription
<action>status, restart, pause, resume, history, or undo
<index>Row number from the current listing, or @name for a mark; kx state or kx mark shows them

Passthrough options

OptionDescription
--allow-missing-template-keysIf true, ignore any errors in templates when a field or map key is missing in the template. Only applies to golang and jsonpath output formats.
--dry-run[=string]Must be “none”, “server”, or “client”. If client strategy, only print the object that would be sent, without sending it. If server strategy, submit server-side request without persisting the resource.
--field-manager stringName of the manager used to track field ownership.
-f, --filename stringsFilename, directory, or URL to files identifying the resource to get from a server.
-k, --kustomize stringProcess the kustomization directory. This flag can’t be used together with -f or -R.
-o, --output stringOutput format. One of: (json, yaml, kyaml, name, go-template, go-template-file, template, templatefile, jsonpath, jsonpath-as-json, jsonpath-file).
-R, --recursiveProcess the directory used in -f, --filename recursively. Useful when you want to manage related manifests organized within the same directory.
--revision int64Pin to a specific revision for showing its status. Defaults to 0 (last revision).
-l, --selector stringSelector (label query) to filter on, supports ‘=’, ‘==’, ‘!=’, ‘in’, ’notin’.(e.g. -l key1=value1,key2=value2,key3 in (value3)). Matching objects must satisfy all of the specified label constraints.
--show-managed-fieldsIf true, keep the managedFields when printing objects in JSON or YAML format.
--template stringTemplate string or path to template file to use when -o=go-template, -o=go-template-file. The template format is golang templates [http://golang.org/pkg/text/template/#pkg-overview].
--timeout durationThe length of time to wait before ending watch, zero means never. Any other values should contain a corresponding time unit (e.g. 1s, 2m, 3h).
--to-revision int64The revision to rollback to. Default to 0 (last revision).
-w, --watchWatch the status of the rollout until it’s done.
…kubectl’s global flags too: --context, --kubeconfig, --as and the rest; kubectl options lists them

Global options

OptionDescription
--no-colorDisable styled output
-h, --helpShow this message and exit

Examples

kx rollout status 1
kx rollout restart 1
kx rollout undo 1
kx rollout undo 1 --to-revision=2
kx rollout status 1 --timeout=2m