容器编排技术 -- Kubernetes kubectl create poddisruptionbudget 命令详解

  • 1 kubectl create poddisruptionbudget
  • 2 语法
  • 3 示例
  • 4 Flags

kubectl create poddisruptionbudget

使用指定的name、selector和所需的最小pod数量,创建一个pod disruption budget。

语法

$ poddisruptionbudget NAME --selector=SELECTOR --min-available=N [--dry-run]

示例

创建名为my-pdb的pod disruption budget,使用app = rails label #来选择所有po​​d,要求至少1个Pod可用。

kubectl create poddisruptionbudget my-pdb --selector=app=rails --min-available=1

创建名为my-pdb的pod disruption budget,使用app = nginx label #选择所有po​​d,要求至少50%Pod可用。

kubectl create pdb my-pdb --selector=app=nginx --min-available=50%

Flags

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   false If true, only print the object that would be sent, without sending it.
generator   poddisruptionbudget/v1beta1/v2 The name of the API generator to use.
max-unavailable     The maximum number or percentage of unavailable pods this budget requires.
min-available     The minimum number or percentage of available pods this budget requires.
no-headers   false When using the default or custom-column output format, don't print headers (default print headers).
output o   Output format. One of: json|yaml|wide|name|custom-columns=...|custom-columns-file=...|go-template=...|go-template-file=...|jsonpath=...|jsonpath-file=... See custom columns [http://kubernetes.io/docs/user-guide/kubectl-overview/#custom-columns], golang template [http://golang.org/pkg/text/template/#pkg-overview] and jsonpath template [http://kubernetes.io/docs/user-guide/jsonpath].
output-version     DEPRECATED: To use a specific API version, fully-qualify the resource, version, and group (for example: 'jobs.v1.batch/myjob').
save-config   false If true, the configuration of current object will be saved in its annotation. Otherwise, the annotation will be unchanged. This flag is useful when you want to perform kubectl apply on this object in the future.
schema-cache-dir   ~/.kube/schema If non-empty, load/store cached API schemas in this directory, default is '$HOME/.kube/schema'
selector     A label selector to use for this budget. Only equality-based selector requirements are supported.
show-all a false When printing, show all resources (default hide terminated pods.)
show-labels   false When printing, show all labels as the last column (default hide labels column)
sort-by     If non-empty, sort list types using this field specification. The field specification is expressed as a JSONPath expression (e.g. '{.metadata.name}'). The field in the API resource specified by this JSONPath expression must be an integer or a string.
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].
validate   true If true, use a schema to validate the input before sending it

容器编排技术 -- Kubernetes kubectl create poddisruptionbudget 命令详解相关推荐

  1. 容器编排技术 -- Kubernetes kubectl create clusterrolebinding 命令详解

    容器编排技术 -- Kubernetes kubectl create clusterrolebinding 命令详解 1 kubectl create clusterrolebinding 2 语法 ...

  2. 容器编排技术 -- Kubernetes kubectl create secret 命令详解

    容器编排技术 -- Kubernetes kubectl create secret 命令详解 1 kubectl create secret 2 语法 3 参考: kubectl create se ...

  3. 容器编排技术 -- Kubernetes kubectl create serviceaccount 命令详解

    容器编排技术 -- Kubernetes kubectl create serviceaccount 命令详解 1 kubectl create serviceaccount 2 语法 3 示例 4  ...

  4. 容器编排技术 -- Kubernetes kubectl create service 命令详解

    容器编排技术 -- Kubernetes kubectl create service 命令详解 1 kubectl create service 2 语法 3 参考 kubectl create s ...

  5. 容器编排技术 -- Kubernetes kubectl create rolebinding 命令详解

    容器编排技术 -- Kubernetes kubectl create rolebinding 命令详解 1 kubectl create rolebinding 2 语法 3 示例 4 Flags ...

  6. 容器编排技术 -- Kubernetes kubectl create role 命令详解

    容器编排技术 -- Kubernetes kubectl create role 命令详解 1 kubectl create role 2 语法 3 示例 4 Flags kubectl create ...

  7. 容器编排技术 -- Kubernetes kubectl create quota 命令详解

    容器编排技术 -- Kubernetes kubectl create quota 命令详解 1 kubectl create quota 2 语法 3 示例 4 Flags kubectl crea ...

  8. 容器编排技术 -- Kubernetes kubectl create namespace 命令详解

    容器编排技术 -- Kubernetes kubectl create namespace 命令详解 1 kubectl create namespace 2 语法 3 示例 4 Flags kube ...

  9. 容器编排技术 -- Kubernetes kubectl create deployment 命令详解

    容器编排技术 -- Kubernetes kubectl create deployment 命令详解 1 kubectl create deployment 2 语法 3 示例 4 Flags ku ...

最新文章

  1. 02、在层级未知情况下通过递归查找子物体
  2. form submit firefox not working
  3. 解析json,是还是不是,
  4. Redis中Value使用hash类型的效率是普通String的两倍
  5. 《深入理解Java虚拟机 - Jvm高级特性与最佳实践(第三版)》阅读笔记
  6. linunx 定位最耗资源的进程
  7. RPC的负载均衡策略
  8. Flutter PageView左右滑动切换视图
  9. dataframe在最下面新增一行
  10. Maven异常:Missing artifact org.slf4j:slf4j-api:jar:1.6.4
  11. Codeforces Round #415 (Div. 2) C. Do you want a date?
  12. 地径 5~6公分 全冠红豆杉 100株待售
  13. vmalloc与mmap
  14. android微信网页视频播放器,关于微信使用内置播放器播放视频的办法
  15. VMware虚拟机下Ubuntu系统安装VMware Tools
  16. python 小世界网络
  17. Insecure Direct Object References
  18. c语言x20是什么意思,为什么vivo X20坚持不用TYPE-C插口?
  19. SQL面试练习题一(基础)
  20. Kinect能掀起体感应用开发热潮吗?

热门文章

  1. 怎样修改WIN7下的host文件
  2. 2010年复旦MBA预审说明
  3. 苹果Swift语言入门教程【中文版】
  4. 236.二叉树的最近公共祖先
  5. vs2005常用的调试方法
  6. tensorflow代码中的tf.app.run()
  7. win8.1除了应用界面的应用,其他系统程序都不能上网,包括IE
  8. 【Linux】shell命令学习之find
  9. 访问修饰符 c# 1613703072
  10. 演练 小米商城 手机版块 0920