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