# kubectl rollout undo 命令详解
回滚到之前的版本。
# 语法
$ undo (TYPE NAME | TYPE/NAME) [flags]
# 示例
回滚到之前的 deployment 版本
kubectl rollout undo deployment/abc
kubectl rollout undo --dry-run=true deployment/abc
回滚到 daemonset 修订 3 版本
kubectl rollout undo daemonset/abc --to-revision=3
# Flags
Name | Shorthand | Default | Usage |
---|---|---|---|
dry-run | false | If true, only print the object that would be sent, without sending it. | |
filename | f | [] | Filename, directory, or URL to files identifying the resource to get from a server. |
recursive | R | false | Process the directory used in -f, --filename recursively. Useful when you want to manage related manifests organized within the same directory. |
to-revision | 0 | The revision to rollback to. Default to 0 (last revision). |