1KUBERNETES(1)                      Jan 2015                      KUBERNETES(1)
2
3
4

NAME

6       kubectl create poddisruptionbudget - Create a pod disruption budget
7       with the specified name.
8
9
10

SYNOPSIS

12       kubectl create poddisruptionbudget [OPTIONS]
13
14
15

DESCRIPTION

17       Create a pod disruption budget with the specified name, selector, and
18       desired minimum available pods
19
20
21

OPTIONS

23       --allow-missing-template-keys=true
24           If true, ignore any errors in templates when a field or map key is
25       missing in the template. Only applies to golang and jsonpath output
26       formats.
27
28
29       --dry-run="none"
30           Must be "none", "server", or "client". If client strategy, only
31       print the object that would be sent, without sending it. If server
32       strategy, submit server-side request without persisting the resource.
33
34
35       --generator="poddisruptionbudget/v1beta1/v2"
36           The name of the API generator to use.
37
38
39       --max-unavailable=""
40           The maximum number or percentage of unavailable pods this budget
41       requires.
42
43
44       --min-available=""
45           The minimum number or percentage of available pods this budget
46       requires.
47
48
49       -o, --output=""
50           Output format. One of:
51       json|yaml|name|go-template|go-template-file|template|templatefile|jsonpath|jsonpath-file.
52
53
54       --save-config=false
55           If true, the configuration of current object will be saved in its
56       annotation. Otherwise, the annotation will be unchanged. This flag is
57       useful when you want to perform kubectl apply on this object in the
58       future.
59
60
61       --selector=""
62           A label selector to use for this budget. Only equality-based
63       selector requirements are supported.
64
65
66       --template=""
67           Template string or path to template file to use when
68       -o=go-template, -o=go-template-file. The template format is golang
69       templates [ ⟨http://golang.org/pkg/text/template/#pkg-overview⟩].
70
71
72       --validate=true
73           If true, use a schema to validate the input before sending it
74
75
76

OPTIONS INHERITED FROM PARENT COMMANDS

78       --add-dir-header=false
79           If true, adds the file directory to the header
80
81
82       --alsologtostderr=false
83           log to standard error as well as files
84
85
86       --application-metrics-count-limit=100
87           Max number of application metrics to store (per container)
88
89
90       --as=""
91           Username to impersonate for the operation
92
93
94       --as-group=[]
95           Group to impersonate for the operation, this flag can be repeated
96       to specify multiple groups.
97
98
99       --azure-container-registry-config=""
100           Path to the file containing Azure container registry configuration
101       information.
102
103
104       --boot-id-file="/proc/sys/kernel/random/boot_id"
105           Comma-separated list of files to check for boot-id. Use the first
106       one that exists.
107
108
109       --cache-dir="/builddir/.kube/http-cache"
110           Default HTTP cache directory
111
112
113       --certificate-authority=""
114           Path to a cert file for the certificate authority
115
116
117       --client-certificate=""
118           Path to a client certificate file for TLS
119
120
121       --client-key=""
122           Path to a client key file for TLS
123
124
125       --cloud-provider-gce-l7lb-src-cidrs=130.211.0.0/22,35.191.0.0/16
126           CIDRs opened in GCE firewall for L7 LB traffic proxy  health checks
127
128
129       --cloud-provider-gce-lb-src-cidrs=130.211.0.0/22,209.85.152.0/22,209.85.204.0/22,35.191.0.0/16
130           CIDRs opened in GCE firewall for L4 LB traffic proxy  health checks
131
132
133       --cluster=""
134           The name of the kubeconfig cluster to use
135
136
137       --container-hints="/etc/cadvisor/container_hints.json"
138           location of the container hints file
139
140
141       --containerd="/run/containerd/containerd.sock"
142           containerd endpoint
143
144
145       --containerd-namespace="k8s.io"
146           containerd namespace
147
148
149       --context=""
150           The name of the kubeconfig context to use
151
152
153       --default-not-ready-toleration-seconds=300
154           Indicates the tolerationSeconds of the toleration for
155       notReady:NoExecute that is added by default to every pod that does not
156       already have such a toleration.
157
158
159       --default-unreachable-toleration-seconds=300
160           Indicates the tolerationSeconds of the toleration for
161       unreachable:NoExecute that is added by default to every pod that does
162       not already have such a toleration.
163
164
165       --disable-root-cgroup-stats=false
166           Disable collecting root Cgroup stats
167
168
169       --docker="unix:///var/run/docker.sock"
170           docker endpoint
171
172
173       --docker-env-metadata-whitelist=""
174           a comma-separated list of environment variable keys that needs to
175       be collected for docker containers
176
177
178       --docker-only=false
179           Only report docker containers in addition to root stats
180
181
182       --docker-root="/var/lib/docker"
183           DEPRECATED: docker root is read from docker info (this is a
184       fallback, default: /var/lib/docker)
185
186
187       --docker-tls=false
188           use TLS to connect to docker
189
190
191       --docker-tls-ca="ca.pem"
192           path to trusted CA
193
194
195       --docker-tls-cert="cert.pem"
196           path to client certificate
197
198
199       --docker-tls-key="key.pem"
200           path to private key
201
202
203       --enable-load-reader=false
204           Whether to enable cpu load reader
205
206
207       --event-storage-age-limit="default=0"
208           Max length of time for which to store events (per type). Value is a
209       comma separated list of key values, where the keys are event types
210       (e.g.: creation, oom) or "default" and the value is a duration. Default
211       is applied to all non-specified event types
212
213
214       --event-storage-event-limit="default=0"
215           Max number of events to store (per type). Value is a comma
216       separated list of key values, where the keys are event types (e.g.:
217       creation, oom) or "default" and the value is an integer. Default is
218       applied to all non-specified event types
219
220
221       --global-housekeeping-interval=1m0s
222           Interval between global housekeepings
223
224
225       --housekeeping-interval=10s
226           Interval between container housekeepings
227
228
229       --insecure-skip-tls-verify=false
230           If true, the server's certificate will not be checked for validity.
231       This will make your HTTPS connections insecure
232
233
234       --kubeconfig=""
235           Path to the kubeconfig file to use for CLI requests.
236
237
238       --log-backtrace-at=:0
239           when logging hits line file:N, emit a stack trace
240
241
242       --log-cadvisor-usage=false
243           Whether to log the usage of the cAdvisor container
244
245
246       --log-dir=""
247           If non-empty, write log files in this directory
248
249
250       --log-file=""
251           If non-empty, use this log file
252
253
254       --log-file-max-size=1800
255           Defines the maximum size a log file can grow to. Unit is megabytes.
256       If the value is 0, the maximum file size is unlimited.
257
258
259       --log-flush-frequency=5s
260           Maximum number of seconds between log flushes
261
262
263       --logtostderr=true
264           log to standard error instead of files
265
266
267       --machine-id-file="/etc/machine-id,/var/lib/dbus/machine-id"
268           Comma-separated list of files to check for machine-id. Use the
269       first one that exists.
270
271
272       --match-server-version=false
273           Require server version to match client version
274
275
276       -n, --namespace=""
277           If present, the namespace scope for this CLI request
278
279
280       --password=""
281           Password for basic authentication to the API server
282
283
284       --profile="none"
285           Name of profile to capture. One of
286       (none|cpu|heap|goroutine|threadcreate|block|mutex)
287
288
289       --profile-output="profile.pprof"
290           Name of the file to write the profile to
291
292
293       --request-timeout="0"
294           The length of time to wait before giving up on a single server
295       request. Non-zero values should contain a corresponding time unit (e.g.
296       1s, 2m, 3h). A value of zero means don't timeout requests.
297
298
299       -s, --server=""
300           The address and port of the Kubernetes API server
301
302
303       --skip-headers=false
304           If true, avoid header prefixes in the log messages
305
306
307       --skip-log-headers=false
308           If true, avoid headers when opening log files
309
310
311       --stderrthreshold=2
312           logs at or above this threshold go to stderr
313
314
315       --storage-driver-buffer-duration=1m0s
316           Writes in the storage driver will be buffered for this duration,
317       and committed to the non memory backends as a single transaction
318
319
320       --storage-driver-db="cadvisor"
321           database name
322
323
324       --storage-driver-host="localhost:8086"
325           database host:port
326
327
328       --storage-driver-password="root"
329           database password
330
331
332       --storage-driver-secure=false
333           use secure connection with database
334
335
336       --storage-driver-table="stats"
337           table name
338
339
340       --storage-driver-user="root"
341           database username
342
343
344       --tls-server-name=""
345           Server name to use for server certificate validation. If it is not
346       provided, the hostname used to contact the server is used
347
348
349       --token=""
350           Bearer token for authentication to the API server
351
352
353       --update-machine-info-interval=5m0s
354           Interval between machine info updates.
355
356
357       --user=""
358           The name of the kubeconfig user to use
359
360
361       --username=""
362           Username for basic authentication to the API server
363
364
365       -v, --v=0
366           number for the log level verbosity
367
368
369       --version=false
370           Print version information and quit
371
372
373       --vmodule=
374           comma-separated list of pattern=N settings for file-filtered
375       logging
376
377
378

EXAMPLE

380                # Create a pod disruption budget named my-pdb that will select all pods with the app=rails label
381                # and require at least one of them being available at any point in time.
382                kubectl create poddisruptionbudget my-pdb --selector=app=rails --min-available=1
383
384                # Create a pod disruption budget named my-pdb that will select all pods with the app=nginx label
385                # and require at least half of the pods selected to be available at any point in time.
386                kubectl create pdb my-pdb --selector=app=nginx --min-available=50%
387
388
389
390

SEE ALSO

392       kubectl-create(1),
393
394
395

HISTORY

397       January 2015, Originally compiled by Eric Paris (eparis at redhat dot
398       com) based on the kubernetes source material, but hopefully they have
399       been automatically generated since!
400
401
402
403Eric Paris                  kubernetes User Manuals              KUBERNETES(1)
Impressum