kubectl rollout pause

将提供的资源标记为暂停

被pause命令暂停的资源不会被控制器协调使用,可以是“kubectl rollout resume”命令恢复已暂停资源。

目前仅支持的资源:deployments。

语法

  1. $ pause RESOURCE

示例

将deployment标记为暂停。#只要deployment在暂停中,使用deployment更新将不会生效。

  1. kubectl rollout pause deployment/nginx

Flags

Name Shorthand Default Usage
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.

K8S中文社区微信公众号

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