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

NAME

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

SYNOPSIS

11       kubectl top pod [OPTIONS]
12
13
14

DESCRIPTION

16       Display Resource (CPU/Memory/Storage) usage of pods.
17
18
19       The  'top  pod'  command  allows you to see the resource consumption of
20       pods.
21
22
23       Due to the metrics pipeline delay, they may be unavailable  for  a  few
24       minutes since pod creation.
25
26
27

OPTIONS

29       --all-namespaces=false
30           If  present,  list  the  requested object(s) across all namespaces.
31       Namespace in current context is ignored even if specified with --names‐
32       pace.
33
34
35       --containers=false
36           If present, print usage of containers within a pod.
37
38
39       --heapster-namespace="kube-system"
40           Namespace Heapster service is located in
41
42
43       --heapster-port=""
44           Port name in service to use
45
46
47       --heapster-scheme="http"
48           Scheme (http or https) to connect to Heapster as
49
50
51       --heapster-service="heapster"
52           Name of Heapster service
53
54
55       --no-headers=false
56           If present, print output without headers.
57
58
59       -l, --selector=""
60           Selector  (label  query)  to  filter  on,  supports  '=', '==', and
61       '!='.(e.g. -l key1=value1,key2=value2)
62
63
64

OPTIONS INHERITED FROM PARENT COMMANDS

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

EXAMPLE

342                # Show metrics for all pods in the default namespace
343                kubectl top pod
344
345                # Show metrics for all pods in the given namespace
346                kubectl top pod --namespace=NAMESPACE
347
348                # Show metrics for a given pod and its containers
349                kubectl top pod POD_NAME --containers
350
351                # Show metrics for the pods defined by label name=myLabel
352                kubectl top pod -l name=myLabel
353
354
355
356

SEE ALSO

358       kubectl-top(1),
359
360
361

HISTORY

363       January  2015,  Originally compiled by Eric Paris (eparis at redhat dot
364       com) based on the kubernetes source material, but hopefully  they  have
365       been automatically generated since!
366
367
368
369Eric Paris                  kubernetes User Manuals              KUBERNETES(1)
Impressum