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