1KUBERNETES(1)(kubernetes)                            KUBERNETES(1)(kubernetes)
2
3
4
5Eric Paris Jan 2015
6
7

NAME

9       kubectl autoscale - Auto-scale a deployment, replica set, stateful set,
10       or replication controller
11
12
13

SYNOPSIS

15       kubectl autoscale [OPTIONS]
16
17
18

DESCRIPTION

20       Creates an autoscaler that automatically chooses and sets the number of
21       pods that run in a Kubernetes cluster.
22
23
24       Looks  up  a deployment, replica set, stateful set, or replication con‐
25       troller by name and creates an autoscaler that uses the given  resource
26       as  a  reference.  An autoscaler can automatically increase or decrease
27       number of pods deployed within the system as needed.
28
29
30

OPTIONS

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

OPTIONS INHERITED FROM PARENT COMMANDS

106       --as=""      Username to impersonate for the operation. User could be a
107       regular user or a service account in a namespace.
108
109
110       --as-group=[]      Group to impersonate for the  operation,  this  flag
111       can be repeated to specify multiple groups.
112
113
114       --as-uid=""      UID to impersonate for the operation.
115
116
117       --azure-container-registry-config=""       Path  to the file containing
118       Azure container registry configuration information.
119
120
121       --cache-dir="/builddir/.kube/cache"      Default cache directory
122
123
124       --certificate-authority=""      Path to a cert file for the certificate
125       authority
126
127
128       --client-certificate=""      Path to a client certificate file for TLS
129
130
131       --client-key=""      Path to a client key file for TLS
132
133
134       --cluster=""      The name of the kubeconfig cluster to use
135
136
137       --context=""      The name of the kubeconfig context to use
138
139
140       --disable-compression=false       If true, opt-out of response compres‐
141       sion for all requests to the server
142
143
144       --insecure-skip-tls-verify=false      If true, the server's certificate
145       will not be checked for validity. This will make your HTTPS connections
146       insecure
147
148
149       --kubeconfig=""      Path to the kubeconfig file to  use  for  CLI  re‐
150       quests.
151
152
153       --match-server-version=false        Require  server  version  to  match
154       client version
155
156
157       -n, --namespace=""      If present, the namespace scope  for  this  CLI
158       request
159
160
161       --password=""      Password for basic authentication to the API server
162
163
164       --profile="none"         Name   of   profile   to   capture.   One   of
165       (none|cpu|heap|goroutine|threadcreate|block|mutex)
166
167
168       --profile-output="profile.pprof"      Name of the  file  to  write  the
169       profile to
170
171
172       --request-timeout="0"       The length of time to wait before giving up
173       on a single server request. Non-zero values  should  contain  a  corre‐
174       sponding time unit (e.g. 1s, 2m, 3h). A value of zero means don't time‐
175       out requests.
176
177
178       -s, --server=""      The address and port of the Kubernetes API server
179
180
181       --tls-server-name=""      Server name to  use  for  server  certificate
182       validation.  If  it  is  not provided, the hostname used to contact the
183       server is used
184
185
186       --token=""      Bearer token for authentication to the API server
187
188
189       --user=""      The name of the kubeconfig user to use
190
191
192       --username=""      Username for basic authentication to the API server
193
194
195       --version=false      Print version information and quit
196
197
198       --warnings-as-errors=false      Treat warnings received from the server
199       as errors and exit with a non-zero exit code
200
201
202

EXAMPLE

204                # 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
205                kubectl autoscale deployment foo --min=2 --max=10
206
207                # Auto scale a replication controller "foo", with the number of pods between 1 and 5, target CPU utilization at 80%
208                kubectl autoscale rc foo --max=5 --cpu-percent=80
209
210
211
212

SEE ALSO

214       kubectl(1),
215
216
217

HISTORY

219       January  2015,  Originally compiled by Eric Paris (eparis at redhat dot
220       com) based on the kubernetes source material, but hopefully  they  have
221       been automatically generated since!
222
223
224
225Manuals                              User            KUBERNETES(1)(kubernetes)
Impressum