kubectl rollout undo

回滚到之前的版本。

语法

  1. $ undo (TYPE NAME | TYPE/NAME) [flags]

示例

回滚到之前的deployment版本

  1. kubectl rollout undo deployment/abc
  1. kubectl rollout undo --dry-run=true deployment/abc

回滚到daemonset 修订3版本

  1. 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).

K8S中文社区微信公众号

原文: http://docs.kubernetes.org.cn/654.html