rollout
Check the rollout status of a daemonset
Manage the rollout of a resource.
Valid resource types include:
- deployments
- daemonsets
- statefulsets
$ kubectl rollout SUBCOMMAND
View the rollout history of a deployment
kubectl rollout history deployment/abc
View the details of daemonset revision 3
kubectl rollout history daemonset/abc --revision=3
View previous rollout revisions and configurations.
Usage
$ kubectl rollout history (TYPE NAME | TYPE/NAME) [flags]
Flags
pause
Paused resources will not be reconciled by a controller. Use “kubectl rollout resume” to resume a paused resource. Currently only deployments support being paused.
Usage
Name | Shorthand | Default | Usage |
---|---|---|---|
allow-missing-template-keys | true | If 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. | |
field-manager | kubectl-rollout | Name of the manager used to track field ownership. | |
filename | f | [] | Filename, directory, or URL to files identifying the resource to get from a server. |
kustomize | k | Process the kustomization directory. This flag can’t be used together with -f or -R. | |
output | o | Output format. One of: json|yaml|name|go-template|go-template-file|template|templatefile|jsonpath|jsonpath-as-json|jsonpath-file. | |
recursive | R | false | Process the directory used in -f, —filename recursively. Useful when you want to manage related manifests organized within the same directory. |
show-managed-fields | false | If true, keep the managedFields when printing objects in JSON or YAML format. | |
template | Template string or path to template file to use when -o=go-template, -o=go-template-file. The template format is golang templates []. |
Restart a deployment
kubectl rollout restart deployment/nginx
Restart a daemon set
kubectl rollout restart daemonset/abc
Restart a resource.
Resource rollout will be restarted.
Usage
$ kubectl rollout restart RESOURCE
Flags
resume
Resume an already paused deployment
kubectl rollout resume deployment/nginx
Resume a paused resource.
Usage
Name | Shorthand | Default | Usage |
---|---|---|---|
allow-missing-template-keys | true | If 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. | |
field-manager | kubectl-rollout | Name of the manager used to track field ownership. | |
filename | f | [] | Filename, directory, or URL to files identifying the resource to get from a server. |
kustomize | k | Process the kustomization directory. This flag can’t be used together with -f or -R. | |
output | o | Output format. One of: json|yaml|name|go-template|go-template-file|template|templatefile|jsonpath|jsonpath-as-json|jsonpath-file. | |
recursive | R | false | Process the directory used in -f, —filename recursively. Useful when you want to manage related manifests organized within the same directory. |
show-managed-fields | false | If true, keep the managedFields when printing objects in JSON or YAML format. | |
template | Template 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]. |
Show the status of the rollout.
By default ‘rollout status’ will watch the status of the latest rollout until it’s done. If you don’t want to wait for the rollout to finish then you can use —watch=false. Note that if a new rollout starts in-between, then ‘rollout status’ will continue watching the latest revision. If you want to pin to a specific revision and abort if it is rolled over by another revision, use —revision=N where N is the revision you need to watch for.
Usage
$ kubectl rollout status (TYPE NAME | TYPE/NAME) [flags]
Flags
undo
Roll back to the previous deployment
kubectl rollout undo deployment/abc
Roll back to daemonset revision 3
Roll back to the previous deployment with dry-run
kubectl rollout undo --dry-run=server deployment/abc
Roll back to a previous rollout.
Usage
Name | Shorthand | Default | Usage |
---|---|---|---|
allow-missing-template-keys | true | If 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 | none | 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. | |
filename | f | [] | Filename, directory, or URL to files identifying the resource to get from a server. |
kustomize | k | Process the kustomization directory. This flag can’t be used together with -f or -R. | |
output | o | Output format. One of: json|yaml|name|go-template|go-template-file|template|templatefile|jsonpath|jsonpath-as-json|jsonpath-file. | |
recursive | R | false | Process the directory used in -f, —filename recursively. Useful when you want to manage related manifests organized within the same directory. |
show-managed-fields | false | If true, keep the managedFields when printing objects in JSON or YAML format. | |
template | Template string or path to template file to use when -o=go-template, -o=go-template-file. The template format is golang templates []. | ||
to-revision | 0 | The revision to rollback to. Default to 0 (last revision). |