1KUBERNETES(1) Jan 2015 KUBERNETES(1)
2
3
4
6 kubectl completion - Output shell completion code for the specified
7 shell (bash or zsh)
8
9
10
12 kubectl completion [OPTIONS]
13
14
15
17 Output shell completion code for the specified shell (bash or zsh). The
18 shell code must be evaluated to provide interactive completion of
19 kubectl commands. This can be done by sourcing it from the .bash _pro‐
20 file.
21
22
23 Detailed instructions on how to do this are available here:
24 ⟨https://kubernetes.io/docs/tasks/tools/install-kubectl/#enabling-
25 shell-autocompletion⟩
26
27
28 Note for zsh users: [1] zsh completions are only supported in versions
29 of zsh >= 5.2
30
31
32
34 --allow-verification-with-non-compliant-keys=false
35 Allow a SignatureVerifier to use keys which are technically
36 non-compliant with RFC6962.
37
38
39 --alsologtostderr=false
40 log to standard error as well as files
41
42
43 --application-metrics-count-limit=100
44 Max number of application metrics to store (per container)
45
46
47 --as=""
48 Username to impersonate for the operation
49
50
51 --as-group=[]
52 Group to impersonate for the operation, this flag can be repeated
53 to specify multiple groups.
54
55
56 --azure-container-registry-config=""
57 Path to the file containing Azure container registry configuration
58 information.
59
60
61 --boot-id-file="/proc/sys/kernel/random/boot_id"
62 Comma-separated list of files to check for boot-id. Use the first
63 one that exists.
64
65
66 --cache-dir="/builddir/.kube/http-cache"
67 Default HTTP cache directory
68
69
70 --certificate-authority=""
71 Path to a cert file for the certificate authority
72
73
74 --client-certificate=""
75 Path to a client certificate file for TLS
76
77
78 --client-key=""
79 Path to a client key file for TLS
80
81
82 --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
83 CIDRs opened in GCE firewall for LB traffic proxy health checks
84
85
86 --cluster=""
87 The name of the kubeconfig cluster to use
88
89
90 --container-hints="/etc/cadvisor/container_hints.json"
91 location of the container hints file
92
93
94 --containerd="unix:///var/run/containerd.sock"
95 containerd endpoint
96
97
98 --context=""
99 The name of the kubeconfig context to use
100
101
102 --default-not-ready-toleration-seconds=300
103 Indicates the tolerationSeconds of the toleration for
104 notReady:NoExecute that is added by default to every pod that does not
105 already have such a toleration.
106
107
108 --default-unreachable-toleration-seconds=300
109 Indicates the tolerationSeconds of the toleration for unreach‐
110 able:NoExecute that is added by default to every pod that does not
111 already have such a toleration.
112
113
114 --docker="unix:///var/run/docker.sock"
115 docker endpoint
116
117
118 --docker-env-metadata-whitelist=""
119 a comma-separated list of environment variable keys that needs to
120 be collected for docker containers
121
122
123 --docker-only=false
124 Only report docker containers in addition to root stats
125
126
127 --docker-root="/var/lib/docker"
128 DEPRECATED: docker root is read from docker info (this is a fall‐
129 back, default: /var/lib/docker)
130
131
132 --docker-tls=false
133 use TLS to connect to docker
134
135
136 --docker-tls-ca="ca.pem"
137 path to trusted CA
138
139
140 --docker-tls-cert="cert.pem"
141 path to client certificate
142
143
144 --docker-tls-key="key.pem"
145 path to private key
146
147
148 --enable-load-reader=false
149 Whether to enable cpu load reader
150
151
152 --event-storage-age-limit="default=0"
153 Max length of time for which to store events (per type). Value is a
154 comma separated list of key values, where the keys are event types
155 (e.g.: creation, oom) or "default" and the value is a duration. Default
156 is applied to all non-specified event types
157
158
159 --event-storage-event-limit="default=0"
160 Max number of events to store (per type). Value is a comma sepa‐
161 rated list of key values, where the keys are event types (e.g.: cre‐
162 ation, oom) or "default" and the value is an integer. Default is
163 applied to all non-specified event types
164
165
166 --global-housekeeping-interval=1m0s
167 Interval between global housekeepings
168
169
170 --google-json-key=""
171 The Google Cloud Platform Service Account JSON Key to use for
172 authentication.
173
174
175 --housekeeping-interval=10s
176 Interval between container housekeepings
177
178
179 --insecure-skip-tls-verify=false
180 If true, the server's certificate will not be checked for validity.
181 This will make your HTTPS connections insecure
182
183
184 --kubeconfig=""
185 Path to the kubeconfig file to use for CLI requests.
186
187
188 --log-backtrace-at=:0
189 when logging hits line file:N, emit a stack trace
190
191
192 --log-cadvisor-usage=false
193 Whether to log the usage of the cAdvisor container
194
195
196 --log-dir=""
197 If non-empty, write log files in this directory
198
199
200 --log-flush-frequency=5s
201 Maximum number of seconds between log flushes
202
203
204 --logtostderr=true
205 log to standard error instead of files
206
207
208 --machine-id-file="/etc/machine-id,/var/lib/dbus/machine-id"
209 Comma-separated list of files to check for machine-id. Use the
210 first one that exists.
211
212
213 --match-server-version=false
214 Require server version to match client version
215
216
217 --mesos-agent="127.0.0.1:5051"
218 Mesos agent address
219
220
221 --mesos-agent-timeout=10s
222 Mesos agent timeout
223
224
225 -n, --namespace=""
226 If present, the namespace scope for this CLI request
227
228
229 --request-timeout="0"
230 The length of time to wait before giving up on a single server
231 request. Non-zero values should contain a corresponding time unit (e.g.
232 1s, 2m, 3h). A value of zero means don't timeout requests.
233
234
235 -s, --server=""
236 The address and port of the Kubernetes API server
237
238
239 --stderrthreshold=2
240 logs at or above this threshold go to stderr
241
242
243 --storage-driver-buffer-duration=1m0s
244 Writes in the storage driver will be buffered for this duration,
245 and committed to the non memory backends as a single transaction
246
247
248 --storage-driver-db="cadvisor"
249 database name
250
251
252 --storage-driver-host="localhost:8086"
253 database host:port
254
255
256 --storage-driver-password="root"
257 database password
258
259
260 --storage-driver-secure=false
261 use secure connection with database
262
263
264 --storage-driver-table="stats"
265 table name
266
267
268 --storage-driver-user="root"
269 database username
270
271
272 --token=""
273 Bearer token for authentication to the API server
274
275
276 --user=""
277 The name of the kubeconfig user to use
278
279
280 -v, --v=0
281 log level for V logs
282
283
284 --version=false
285 Print version information and quit
286
287
288 --vmodule=
289 comma-separated list of pattern=N settings for file-filtered log‐
290 ging
291
292
293
295 # Installing bash completion on macOS using homebrew
296 ## If running Bash 3.2 included with macOS
297 brew install bash-completion
298 ## or, if running Bash 4.1+
299 brew install bash-completion@2
300 ## If kubectl is installed via homebrew, this should start working immediately.
301 ## If you've installed via other means, you may need add the completion to your completion directory
302 kubectl completion bash > $(brew --prefix)/etc/bash_completion.d/kubectl
303
304
305 # Installing bash completion on Linux
306 ## If bash-completion is not installed on Linux, please install the 'bash-completion' package
307 ## via your distribution's package manager.
308 ## Load the kubectl completion code for bash into the current shell
309 source <(kubectl completion bash)
310 ## Write bash completion code to a file and source if from .bash_profile
311 kubectl completion bash > /.kube/completion.bash.inc
312 printf "
313 # Kubectl shell completion
314 source '$HOME/.kube/completion.bash.inc'
315 " >> $HOME/.bash_profile
316 source $HOME/.bash_profile
317
318 # Load the kubectl completion code for zsh[1] into the current shell
319 source <(kubectl completion zsh)
320 # Set the kubectl completion code for zsh[1] to autoload on startup
321 kubectl completion zsh > "${fpath[1]}/_kubectl"
322
323
324
325
327 kubectl(1),
328
329
330
332 January 2015, Originally compiled by Eric Paris (eparis at redhat dot
333 com) based on the kubernetes source material, but hopefully they have
334 been automatically generated since!
335
336
337
338Eric Paris kubernetes User Manuals KUBERNETES(1)