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