Kubernetes kubectl rollout pause 命令详解

kubectl rollout pause

将提供的资源标记为暂停

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

目前仅支持的资源:deployments。

语法

$ pause RESOURCE

示例

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

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.