@@ -28,11 +28,22 @@ kubectl config set-cluster NAME [--server=server] [--certificate-authority=path/
28
28
## {{% heading "examples" %}}
29
29
30
30
<!--
31
+ ```
31
32
# Set only the server field on the e2e cluster entry without touching other values
33
+ kubectl config set-cluster e2e --server=https://1.2.3.4
34
+
32
35
# Embed certificate authority data for the e2e cluster entry
36
+ kubectl config set-cluster e2e --embed-certs --certificate-authority=~/.kube/e2e/kubernetes.ca.crt
37
+
33
38
# Disable cert checking for the e2e cluster entry
39
+ kubectl config set-cluster e2e --insecure-skip-tls-verify=true
40
+
34
41
# Set the custom TLS server name to use for validation for the e2e cluster entry
42
+ kubectl config set-cluster e2e --tls-server-name=my-cluster-name
43
+
35
44
# Set the proxy URL for the e2e cluster entry
45
+ kubectl config set-cluster e2e --proxy-url=https://1.2.3.4
46
+ ```
36
47
-->
37
48
``` shell
38
49
# 仅设置 e2e 集群条目上的 server 字段,不触及其他值
@@ -167,7 +178,8 @@ kubeconfig 中的集群条目的 tls-server-name 字段。
167
178
<td colspan =" 2 " >--as string</td >
168
179
</tr >
169
180
<tr >
170
- <td ></td ><td style =" line-height : 130% ; word-wrap : break-word ;" ><p >
181
+ <td ></td ><td style =" line-height : 130% ; word-wrap : break-word ;" >
182
+ <p >
171
183
<!--
172
184
Username to impersonate for the operation. User could be a regular user or a service account in a namespace.
173
185
-->
@@ -179,7 +191,8 @@ Username to impersonate for the operation. User could be a regular user or a ser
179
191
<td colspan =" 2 " >--as-group strings</td >
180
192
</tr >
181
193
<tr >
182
- <td ></td ><td style =" line-height : 130% ; word-wrap : break-word ;" ><p >
194
+ <td ></td ><td style =" line-height : 130% ; word-wrap : break-word ;" >
195
+ <p >
183
196
<!--
184
197
Group to impersonate for the operation, this flag can be repeated to specify multiple groups.
185
198
-->
@@ -191,7 +204,8 @@ Group to impersonate for the operation, this flag can be repeated to specify mul
191
204
<td colspan =" 2 " >--as-uid string</td >
192
205
</tr >
193
206
<tr >
194
- <td ></td ><td style =" line-height : 130% ; word-wrap : break-word ;" ><p >
207
+ <td ></td ><td style =" line-height : 130% ; word-wrap : break-word ;" >
208
+ <p >
195
209
<!--
196
210
UID to impersonate for the operation.
197
211
-->
@@ -203,7 +217,8 @@ UID to impersonate for the operation.
203
217
<td colspan =" 2 " >--cache-dir string  ;  ;  ;  ;  ; <!-- Default: "$HOME/.kube/cache"--> 默认值:"$HOME/.kube/cache"</td >
204
218
</tr >
205
219
<tr >
206
- <td ></td ><td style =" line-height : 130% ; word-wrap : break-word ;" ><p >
220
+ <td ></td ><td style =" line-height : 130% ; word-wrap : break-word ;" >
221
+ <p >
207
222
<!--
208
223
Default cache directory
209
224
-->
@@ -215,7 +230,8 @@ Default cache directory
215
230
<td colspan =" 2 " >--certificate-authority string</td >
216
231
</tr >
217
232
<tr >
218
- <td ></td ><td style =" line-height : 130% ; word-wrap : break-word ;" ><p >
233
+ <td ></td ><td style =" line-height : 130% ; word-wrap : break-word ;" >
234
+ <p >
219
235
<!--
220
236
Path to a cert file for the certificate authority
221
237
-->
@@ -227,7 +243,8 @@ Path to a cert file for the certificate authority
227
243
<td colspan =" 2 " >--client-certificate string</td >
228
244
</tr >
229
245
<tr >
230
- <td ></td ><td style =" line-height : 130% ; word-wrap : break-word ;" ><p >
246
+ <td ></td ><td style =" line-height : 130% ; word-wrap : break-word ;" >
247
+ <p >
231
248
<!--
232
249
Path to a client certificate file for TLS
233
250
-->
@@ -239,7 +256,8 @@ TLS 客户端证书文件的路径。
239
256
<td colspan =" 2 " >--client-key string</td >
240
257
</tr >
241
258
<tr >
242
- <td ></td ><td style =" line-height : 130% ; word-wrap : break-word ;" ><p >
259
+ <td ></td ><td style =" line-height : 130% ; word-wrap : break-word ;" >
260
+ <p >
243
261
<!--
244
262
Path to a client key file for TLS
245
263
-->
@@ -251,7 +269,8 @@ TLS 客户端密钥文件的路径。
251
269
<td colspan =" 2 " >--cluster string</td >
252
270
</tr >
253
271
<tr >
254
- <td ></td ><td style =" line-height : 130% ; word-wrap : break-word ;" ><p >
272
+ <td ></td ><td style =" line-height : 130% ; word-wrap : break-word ;" >
273
+ <p >
255
274
<!--
256
275
The name of the kubeconfig cluster to use
257
276
-->
@@ -263,7 +282,8 @@ The name of the kubeconfig cluster to use
263
282
<td colspan =" 2 " >--context string</td >
264
283
</tr >
265
284
<tr >
266
- <td ></td ><td style =" line-height : 130% ; word-wrap : break-word ;" ><p >
285
+ <td ></td ><td style =" line-height : 130% ; word-wrap : break-word ;" >
286
+ <p >
267
287
<!--
268
288
The name of the kubeconfig context to use
269
289
-->
@@ -272,34 +292,40 @@ The name of the kubeconfig context to use
272
292
</tr >
273
293
274
294
<tr >
275
- <td colspan =" 2 " >--default-not-ready-toleration-seconds int & nbsp ;& nbsp ;& nbsp ;& nbsp ;& nbsp ; <!-- Default: 300 --> 默认值:300 </td >
295
+ <td colspan =" 2 " >--kubeconfig string </td >
276
296
</tr >
277
297
<tr >
278
- <td ></td ><td style =" line-height : 130% ; word-wrap : break-word ;" ><p >
298
+ <td ></td ><td style =" line-height : 130% ; word-wrap : break-word ;" >
299
+ <p >
279
300
<!--
280
- Indicates the tolerationSeconds of the toleration for notReady:NoExecute that is added by default to every pod that does not already have such a toleration.
301
+ use a particular kubeconfig file
281
302
-->
282
- 设置针对 notReady: NoExecute 的容忍度的 tolerationSeconds,默认添加到所有尚未设置此容忍度的 Pod。
283
- </p ></td >
303
+ 使用特定的 kubeconfig 文件
304
+ </p >
305
+ </td >
284
306
</tr >
285
307
286
308
<tr >
287
- <td colspan =" 2 " >--default-unreachable-toleration-seconds int & nbsp ;& nbsp ;& nbsp ;& nbsp ;& nbsp ; <!-- Default: 300 --> 默认值:300 </td >
309
+ <td colspan =" 2 " >--kuberc string </td >
288
310
</tr >
289
311
<tr >
290
- <td ></td ><td style =" line-height : 130% ; word-wrap : break-word ;" ><p >
312
+ <td ></td ><td style =" line-height : 130% ; word-wrap : break-word ;" >
313
+ <p >
291
314
<!--
292
- Indicates the tolerationSeconds of the toleration for unreachable:NoExecute that is added by default to every pod that does not already have such a toleration .
315
+ Path to the kuberc file to use for preferences. This can be disabled by exporting KUBECTL_KUBERC=false feature gate or turning off the feature KUBERC=off .
293
316
-->
294
- 设置针对 unreachable: NoExecute 的容忍度的 tolerationSeconds,默认添加到所有尚未设置此容忍度的 Pod。
295
- </p ></td >
317
+ 用于偏好设置的 kuberc 文件的路径。可以通过导出 KUBECTL_KUBERC=false
318
+ 特性门控或关闭 KUBERC=off 特性门控来禁用此功能。
319
+ </p >
320
+ </td >
296
321
</tr >
297
322
298
323
<tr >
299
324
<td colspan =" 2 " >--disable-compression</td >
300
325
</tr >
301
326
<tr >
302
- <td ></td ><td style =" line-height : 130% ; word-wrap : break-word ;" ><p >
327
+ <td ></td ><td style =" line-height : 130% ; word-wrap : break-word ;" >
328
+ <p >
303
329
<!--
304
330
If true, opt-out of response compression for all requests to the server
305
331
-->
@@ -311,7 +337,8 @@ If true, opt-out of response compression for all requests to the server
311
337
<td colspan =" 2 " >--insecure-skip-tls-verify</td >
312
338
</tr >
313
339
<tr >
314
- <td ></td ><td style =" line-height : 130% ; word-wrap : break-word ;" ><p >
340
+ <td ></td ><td style =" line-height : 130% ; word-wrap : break-word ;" >
341
+ <p >
315
342
<!--
316
343
If true, the server's certificate will not be checked for validity. This will make your HTTPS connections insecure
317
344
-->
@@ -323,7 +350,8 @@ If true, the server's certificate will not be checked for validity. This will ma
323
350
<td colspan =" 2 " >--kubeconfig string</td >
324
351
</tr >
325
352
<tr >
326
- <td ></td ><td style =" line-height : 130% ; word-wrap : break-word ;" ><p >
353
+ <td ></td ><td style =" line-height : 130% ; word-wrap : break-word ;" >
354
+ <p >
327
355
<!--
328
356
Path to the kubeconfig file to use for CLI requests.
329
357
-->
@@ -335,7 +363,8 @@ CLI 请求要使用的 kubeconfig 文件的路径。
335
363
<td colspan =" 2 " >--match-server-version</td >
336
364
</tr >
337
365
<tr >
338
- <td ></td ><td style =" line-height : 130% ; word-wrap : break-word ;" ><p >
366
+ <td ></td ><td style =" line-height : 130% ; word-wrap : break-word ;" >
367
+ <p >
339
368
<!--
340
369
Require server version to match client version
341
370
-->
@@ -347,7 +376,8 @@ Require server version to match client version
347
376
<td colspan =" 2 " >-n, --namespace string</td >
348
377
</tr >
349
378
<tr >
350
- <td ></td ><td style =" line-height : 130% ; word-wrap : break-word ;" ><p >
379
+ <td ></td ><td style =" line-height : 130% ; word-wrap : break-word ;" >
380
+ <p >
351
381
<!--
352
382
If present, the namespace scope for this CLI request
353
383
-->
@@ -359,7 +389,8 @@ If present, the namespace scope for this CLI request
359
389
<td colspan =" 2 " >--password string</td >
360
390
</tr >
361
391
<tr >
362
- <td ></td ><td style =" line-height : 130% ; word-wrap : break-word ;" ><p >
392
+ <td ></td ><td style =" line-height : 130% ; word-wrap : break-word ;" >
393
+ <p >
363
394
<!--
364
395
Password for basic authentication to the API server
365
396
-->
@@ -371,7 +402,8 @@ Password for basic authentication to the API server
371
402
<td colspan =" 2 " >--profile string  ;  ;  ;  ;  ; <!-- Default: "none"--> 默认值:"none"</td >
372
403
</tr >
373
404
<tr >
374
- <td ></td ><td style =" line-height : 130% ; word-wrap : break-word ;" ><p >
405
+ <td ></td ><td style =" line-height : 130% ; word-wrap : break-word ;" >
406
+ <p >
375
407
<!--
376
408
Name of profile to capture. One of (none|cpu|heap|goroutine|threadcreate|block|mutex)
377
409
-->
@@ -383,7 +415,8 @@ Name of profile to capture. One of (none|cpu|heap|goroutine|threadcreate|block|m
383
415
<td colspan =" 2 " >--profile-output string  ;  ;  ;  ;  ; <!-- Default: "profile.pprof"--> 默认值:"profile.pprof"</td >
384
416
</tr >
385
417
<tr >
386
- <td ></td ><td style =" line-height : 130% ; word-wrap : break-word ;" ><p >
418
+ <td ></td ><td style =" line-height : 130% ; word-wrap : break-word ;" >
419
+ <p >
387
420
<!--
388
421
Name of the file to write the profile to
389
422
-->
@@ -395,7 +428,8 @@ Name of the file to write the profile to
395
428
<td colspan =" 2 " >--request-timeout string  ;  ;  ;  ;  ; <!-- Default: "0"--> 默认值:"0"</td >
396
429
</tr >
397
430
<tr >
398
- <td ></td ><td style =" line-height : 130% ; word-wrap : break-word ;" ><p >
431
+ <td ></td ><td style =" line-height : 130% ; word-wrap : break-word ;" >
432
+ <p >
399
433
<!--
400
434
The length of time to wait before giving up on a single server request. Non-zero values should contain a corresponding time unit (e.g. 1s, 2m, 3h). A value of zero means don't timeout requests.
401
435
-->
@@ -408,7 +442,8 @@ The length of time to wait before giving up on a single server request. Non-zero
408
442
<td colspan =" 2 " >-s, --server string</td >
409
443
</tr >
410
444
<tr >
411
- <td ></td ><td style =" line-height : 130% ; word-wrap : break-word ;" ><p >
445
+ <td ></td ><td style =" line-height : 130% ; word-wrap : break-word ;" >
446
+ <p >
412
447
<!--
413
448
The address and port of the Kubernetes API server
414
449
-->
@@ -420,7 +455,8 @@ Kubernetes API 服务器的地址和端口。
420
455
<td colspan =" 2 " >--storage-driver-buffer-duration duration  ;  ;  ;  ;  ; <!-- Default: 1m0s--> 默认值:1m0s</td >
421
456
</tr >
422
457
<tr >
423
- <td ></td ><td style =" line-height : 130% ; word-wrap : break-word ;" ><p >
458
+ <td ></td ><td style =" line-height : 130% ; word-wrap : break-word ;" >
459
+ <p >
424
460
<!--
425
461
Writes in the storage driver will be buffered for this duration, and committed to the non memory backends as a single transaction
426
462
-->
@@ -432,7 +468,8 @@ Writes in the storage driver will be buffered for this duration, and committed t
432
468
<td colspan =" 2 " >--storage-driver-db string  ;  ;  ;  ;  ; <!-- Default: "cadvisor"--> 默认值:"cadvisor"</td >
433
469
</tr >
434
470
<tr >
435
- <td ></td ><td style =" line-height : 130% ; word-wrap : break-word ;" ><p >
471
+ <td ></td ><td style =" line-height : 130% ; word-wrap : break-word ;" >
472
+ <p >
436
473
<!--
437
474
database name
438
475
-->
@@ -444,7 +481,8 @@ database name
444
481
<td colspan =" 2 " >--storage-driver-host string  ;  ;  ;  ;  ; <!-- Default: "localhost:8086"--> 默认值:"localhost:8086"</td >
445
482
</tr >
446
483
<tr >
447
- <td ></td ><td style =" line-height : 130% ; word-wrap : break-word ;" ><p >
484
+ <td ></td ><td style =" line-height : 130% ; word-wrap : break-word ;" >
485
+ <p >
448
486
<!--
449
487
database host:port
450
488
-->
0 commit comments