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

NAME

6       kubectl top - Display Resource (CPU/Memory/Storage) usage.
7
8
9

SYNOPSIS

11       kubectl top [OPTIONS]
12
13
14

DESCRIPTION

16       Display Resource (CPU/Memory/Storage) usage.
17
18
19       The top command allows you to see the resource consumption for nodes or
20       pods.
21
22
23       This command requires Metrics Server to be correctly configured and
24       working on the server.
25
26
27

OPTIONS INHERITED FROM PARENT COMMANDS

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

SEE ALSO

331       kubectl(1), kubectl-top-node(1), kubectl-top-pod(1),
332
333
334

HISTORY

336       January 2015, Originally compiled by Eric Paris (eparis at redhat dot
337       com) based on the kubernetes source material, but hopefully they have
338       been automatically generated since!
339
340
341
342Eric Paris                  kubernetes User Manuals              KUBERNETES(1)
Impressum