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

NAME

6       kubectl  autoscale  -  Auto-scale a Deployment, ReplicaSet, or Replica‐
7       tionController
8
9
10

SYNOPSIS

12       kubectl autoscale [OPTIONS]
13
14
15

DESCRIPTION

17       Creates an autoscaler that automatically chooses and sets the number of
18       pods that run in a kubernetes cluster.
19
20
21       Looks up a Deployment, ReplicaSet, or ReplicationController by name and
22       creates an autoscaler that uses the given resource as a  reference.  An
23       autoscaler  can  automatically  increase  or  decrease  number  of pods
24       deployed within the system as needed.
25
26
27

OPTIONS

29       --allow-missing-template-keys=true
30           If true, ignore any errors in templates when a field or map key  is
31       missing  in  the  template.  Only applies to golang and jsonpath output
32       formats.
33
34
35       --cpu-percent=-1
36           The target average CPU utilization (represented  as  a  percent  of
37       requested  CPU) over all the pods. If it's not specified or negative, a
38       default autoscaling policy will be used.
39
40
41       --dry-run=false
42           If true, only print the object that would be sent, without  sending
43       it.
44
45
46       -f, --filename=[]
47           Filename,  directory,  or  URL to files identifying the resource to
48       autoscale.
49
50
51       --generator="horizontalpodautoscaler/v1"
52           The name of the API generator to use. Currently  there  is  only  1
53       generator.
54
55
56       --max=-1
57           The  upper  limit  for  the  number  of pods that can be set by the
58       autoscaler. Required.
59
60
61       --min=-1
62           The lower limit for the number of pods  that  can  be  set  by  the
63       autoscaler.  If it's not specified or negative, the server will apply a
64       default value.
65
66
67       --name=""
68           The name for the newly created object. If not specified,  the  name
69       of the input resource will be used.
70
71
72       -o, --output=""
73           Output  format. One of: json|yaml|name|template|go-template|go-tem‐
74       plate-file|templatefile|jsonpath|jsonpath-file.
75
76
77       --record=false
78           Record current kubectl command in the resource annotation.  If  set
79       to  false,  do  not record the command. If set to true, record the com‐
80       mand. If not set, default to updating  the  existing  annotation  value
81       only if one already exists.
82
83
84       -R, --recursive=false
85           Process  the  directory  used in -f, --filename recursively. Useful
86       when you want to manage related manifests  organized  within  the  same
87       directory.
88
89
90       --save-config=false
91           If  true,  the configuration of current object will be saved in its
92       annotation. Otherwise, the annotation will be unchanged. This  flag  is
93       useful  when  you  want  to perform kubectl apply on this object in the
94       future.
95
96
97       --template=""
98           Template string or path to template file  to  use  when  -o=go-tem‐
99       plate,  -o=go-template-file.  The template format is golang templates [
100http://golang.org/pkg/text/template/#pkg-overview⟩].
101
102
103

OPTIONS INHERITED FROM PARENT COMMANDS

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

EXAMPLE

366                # Auto scale a deployment "foo", with the number of pods between 2 and 10, no target CPU utilization specified so a default autoscaling policy will be used:
367                kubectl autoscale deployment foo --min=2 --max=10
368
369                # Auto scale a replication controller "foo", with the number of pods between 1 and 5, target CPU utilization at 80%:
370                kubectl autoscale rc foo --max=5 --cpu-percent=80
371
372
373
374

SEE ALSO

376       kubectl(1),
377
378
379

HISTORY

381       January 2015, Originally compiled by Eric Paris (eparis at  redhat  dot
382       com)  based  on the kubernetes source material, but hopefully they have
383       been automatically generated since!
384
385
386
387Eric Paris                  kubernetes User Manuals              KUBERNETES(1)
Impressum