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