@@ -23,7 +23,7 @@ Configure application resources.
23
23
24
24
这些命令可帮助你更改现有的应用程序资源。
25
25
26
- ```
26
+ ``` shell
27
27
kubectl set SUBCOMMAND
28
28
```
29
29
@@ -52,8 +52,6 @@ help for set
52
52
</tbody >
53
53
</table >
54
54
55
-
56
-
57
55
## {{% heading "parentoptions" %}}
58
56
59
57
<table style =" width : 100% ; table-layout : fixed ;" >
@@ -67,7 +65,8 @@ help for set
67
65
<td colspan =" 2 " >--as string</td >
68
66
</tr >
69
67
<tr >
70
- <td ></td ><td style =" line-height : 130% ; word-wrap : break-word ;" ><p >
68
+ <td ></td ><td style =" line-height : 130% ; word-wrap : break-word ;" >
69
+ <p >
71
70
<!--
72
71
Username to impersonate for the operation. User could be a regular user or a service account in a namespace.
73
72
-->
@@ -79,7 +78,8 @@ Username to impersonate for the operation. User could be a regular user or a ser
79
78
<td colspan =" 2 " >--as-group strings</td >
80
79
</tr >
81
80
<tr >
82
- <td ></td ><td style =" line-height : 130% ; word-wrap : break-word ;" ><p >
81
+ <td ></td ><td style =" line-height : 130% ; word-wrap : break-word ;" >
82
+ <p >
83
83
<!--
84
84
Group to impersonate for the operation, this flag can be repeated to specify multiple groups.
85
85
-->
@@ -91,7 +91,8 @@ Group to impersonate for the operation, this flag can be repeated to specify mul
91
91
<td colspan =" 2 " >--as-uid string</td >
92
92
</tr >
93
93
<tr >
94
- <td ></td ><td style =" line-height : 130% ; word-wrap : break-word ;" ><p >
94
+ <td ></td ><td style =" line-height : 130% ; word-wrap : break-word ;" >
95
+ <p >
95
96
<!--
96
97
UID to impersonate for the operation.
97
98
-->
@@ -103,7 +104,8 @@ UID to impersonate for the operation.
103
104
<td colspan =" 2 " >--cache-dir string  ;  ;  ;  ;  ; <!-- Default: "$HOME/.kube/cache"--> 默认值:"$HOME/.kube/cache"</td >
104
105
</tr >
105
106
<tr >
106
- <td ></td ><td style =" line-height : 130% ; word-wrap : break-word ;" ><p >
107
+ <td ></td ><td style =" line-height : 130% ; word-wrap : break-word ;" >
108
+ <p >
107
109
<!--
108
110
Default cache directory
109
111
-->
@@ -115,7 +117,8 @@ Default cache directory
115
117
<td colspan =" 2 " >--certificate-authority string</td >
116
118
</tr >
117
119
<tr >
118
- <td ></td ><td style =" line-height : 130% ; word-wrap : break-word ;" ><p >
120
+ <td ></td ><td style =" line-height : 130% ; word-wrap : break-word ;" >
121
+ <p >
119
122
<!--
120
123
Path to a cert file for the certificate authority
121
124
-->
@@ -127,7 +130,8 @@ Path to a cert file for the certificate authority
127
130
<td colspan =" 2 " >--client-certificate string</td >
128
131
</tr >
129
132
<tr >
130
- <td ></td ><td style =" line-height : 130% ; word-wrap : break-word ;" ><p >
133
+ <td ></td ><td style =" line-height : 130% ; word-wrap : break-word ;" >
134
+ <p >
131
135
<!--
132
136
Path to a client certificate file for TLS
133
137
-->
@@ -139,7 +143,8 @@ TLS 客户端证书文件的路径。
139
143
<td colspan =" 2 " >--client-key string</td >
140
144
</tr >
141
145
<tr >
142
- <td ></td ><td style =" line-height : 130% ; word-wrap : break-word ;" ><p >
146
+ <td ></td ><td style =" line-height : 130% ; word-wrap : break-word ;" >
147
+ <p >
143
148
<!--
144
149
Path to a client key file for TLS
145
150
-->
@@ -151,7 +156,8 @@ TLS 客户端密钥文件的路径。
151
156
<td colspan =" 2 " >--cluster string</td >
152
157
</tr >
153
158
<tr >
154
- <td ></td ><td style =" line-height : 130% ; word-wrap : break-word ;" ><p >
159
+ <td ></td ><td style =" line-height : 130% ; word-wrap : break-word ;" >
160
+ <p >
155
161
<!--
156
162
The name of the kubeconfig cluster to use
157
163
-->
@@ -163,43 +169,21 @@ The name of the kubeconfig cluster to use
163
169
<td colspan =" 2 " >--context string</td >
164
170
</tr >
165
171
<tr >
166
- <td ></td ><td style =" line-height : 130% ; word-wrap : break-word ;" ><p >
172
+ <td ></td ><td style =" line-height : 130% ; word-wrap : break-word ;" >
173
+ <p >
167
174
<!--
168
175
The name of the kubeconfig context to use
169
176
-->
170
177
要使用的 kubeconfig 上下文的名称。
171
178
</p ></td >
172
179
</tr >
173
180
174
- <tr >
175
- <td colspan =" 2 " >--default-not-ready-toleration-seconds int  ;  ;  ;  ;  ; <!-- Default: 300--> 默认值:300</td >
176
- </tr >
177
- <tr >
178
- <td ></td ><td style =" line-height : 130% ; word-wrap : break-word ;" ><p >
179
- <!--
180
- 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.
181
- -->
182
- 设置针对 notReady: NoExecute 的容忍度的 tolerationSeconds,默认添加到所有尚未设置此容忍度的 Pod。
183
- </p ></td >
184
- </tr >
185
-
186
- <tr >
187
- <td colspan =" 2 " >--default-unreachable-toleration-seconds int  ;  ;  ;  ;  ; <!-- Default: 300--> 默认值:300</td >
188
- </tr >
189
- <tr >
190
- <td ></td ><td style =" line-height : 130% ; word-wrap : break-word ;" ><p >
191
- <!--
192
- 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.
193
- -->
194
- 设置针对 unreachable: NoExecute 的容忍度的 tolerationSeconds,默认添加到所有尚未设置此容忍度的 Pod。
195
- </p ></td >
196
- </tr >
197
-
198
181
<tr >
199
182
<td colspan =" 2 " >--disable-compression</td >
200
183
</tr >
201
184
<tr >
202
- <td ></td ><td style =" line-height : 130% ; word-wrap : break-word ;" ><p >
185
+ <td ></td ><td style =" line-height : 130% ; word-wrap : break-word ;" >
186
+ <p >
203
187
<!--
204
188
If true, opt-out of response compression for all requests to the server
205
189
-->
@@ -211,7 +195,8 @@ If true, opt-out of response compression for all requests to the server
211
195
<td colspan =" 2 " >--insecure-skip-tls-verify</td >
212
196
</tr >
213
197
<tr >
214
- <td ></td ><td style =" line-height : 130% ; word-wrap : break-word ;" ><p >
198
+ <td ></td ><td style =" line-height : 130% ; word-wrap : break-word ;" >
199
+ <p >
215
200
<!--
216
201
If true, the server's certificate will not be checked for validity. This will make your HTTPS connections insecure
217
202
-->
@@ -223,19 +208,35 @@ If true, the server's certificate will not be checked for validity. This will ma
223
208
<td colspan =" 2 " >--kubeconfig string</td >
224
209
</tr >
225
210
<tr >
226
- <td ></td ><td style =" line-height : 130% ; word-wrap : break-word ;" ><p >
211
+ <td ></td ><td style =" line-height : 130% ; word-wrap : break-word ;" >
212
+ <p >
227
213
<!--
228
214
Path to the kubeconfig file to use for CLI requests.
229
215
-->
230
216
CLI 请求要使用的 kubeconfig 文件的路径。
231
217
</p ></td >
232
218
</tr >
233
219
220
+ <tr >
221
+ <td colspan =" 2 " >--kuberc string</td >
222
+ </tr >
223
+ <tr >
224
+ <td ></td ><td style =" line-height : 130% ; word-wrap : break-word ;" >
225
+ <p >
226
+ <!--
227
+ 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.
228
+ -->
229
+ 用于偏好设置的 kuberc 文件的路径。可以通过导出 KUBECTL_KUBERC=false
230
+ 特性门控或关闭 KUBERC=off 特性门控来禁用此功能。
231
+ </p ></td >
232
+ </tr >
233
+
234
234
<tr >
235
235
<td colspan =" 2 " >--match-server-version</td >
236
236
</tr >
237
237
<tr >
238
- <td ></td ><td style =" line-height : 130% ; word-wrap : break-word ;" ><p >
238
+ <td ></td ><td style =" line-height : 130% ; word-wrap : break-word ;" >
239
+ <p >
239
240
<!--
240
241
Require server version to match client version
241
242
-->
@@ -247,7 +248,8 @@ Require server version to match client version
247
248
<td colspan =" 2 " >-n, --namespace string</td >
248
249
</tr >
249
250
<tr >
250
- <td ></td ><td style =" line-height : 130% ; word-wrap : break-word ;" ><p >
251
+ <td ></td ><td style =" line-height : 130% ; word-wrap : break-word ;" >
252
+ <p >
251
253
<!--
252
254
If present, the namespace scope for this CLI request
253
255
-->
@@ -259,7 +261,8 @@ If present, the namespace scope for this CLI request
259
261
<td colspan =" 2 " >--password string</td >
260
262
</tr >
261
263
<tr >
262
- <td ></td ><td style =" line-height : 130% ; word-wrap : break-word ;" ><p >
264
+ <td ></td ><td style =" line-height : 130% ; word-wrap : break-word ;" >
265
+ <p >
263
266
<!--
264
267
Password for basic authentication to the API server
265
268
-->
@@ -271,7 +274,8 @@ Password for basic authentication to the API server
271
274
<td colspan =" 2 " >--profile string  ;  ;  ;  ;  ; <!-- Default: "none"--> 默认值:"none"</td >
272
275
</tr >
273
276
<tr >
274
- <td ></td ><td style =" line-height : 130% ; word-wrap : break-word ;" ><p >
277
+ <td ></td ><td style =" line-height : 130% ; word-wrap : break-word ;" >
278
+ <p >
275
279
<!--
276
280
Name of profile to capture. One of (none|cpu|heap|goroutine|threadcreate|block|mutex)
277
281
-->
@@ -283,7 +287,8 @@ Name of profile to capture. One of (none|cpu|heap|goroutine|threadcreate|block|m
283
287
<td colspan =" 2 " >--profile-output string  ;  ;  ;  ;  ; <!-- Default: "profile.pprof"--> 默认值:"profile.pprof"</td >
284
288
</tr >
285
289
<tr >
286
- <td ></td ><td style =" line-height : 130% ; word-wrap : break-word ;" ><p >
290
+ <td ></td ><td style =" line-height : 130% ; word-wrap : break-word ;" >
291
+ <p >
287
292
<!--
288
293
Name of the file to write the profile to
289
294
-->
@@ -295,7 +300,8 @@ Name of the file to write the profile to
295
300
<td colspan =" 2 " >--request-timeout string  ;  ;  ;  ;  ; <!-- Default: "0"--> 默认值:"0"</td >
296
301
</tr >
297
302
<tr >
298
- <td ></td ><td style =" line-height : 130% ; word-wrap : break-word ;" ><p >
303
+ <td ></td ><td style =" line-height : 130% ; word-wrap : break-word ;" >
304
+ <p >
299
305
<!--
300
306
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.
301
307
-->
@@ -308,7 +314,8 @@ The length of time to wait before giving up on a single server request. Non-zero
308
314
<td colspan =" 2 " >-s, --server string</td >
309
315
</tr >
310
316
<tr >
311
- <td ></td ><td style =" line-height : 130% ; word-wrap : break-word ;" ><p >
317
+ <td ></td ><td style =" line-height : 130% ; word-wrap : break-word ;" >
318
+ <p >
312
319
<!--
313
320
The address and port of the Kubernetes API server
314
321
-->
@@ -320,7 +327,8 @@ Kubernetes API 服务器的地址和端口。
320
327
<td colspan =" 2 " >--storage-driver-buffer-duration duration  ;  ;  ;  ;  ; <!-- Default: 1m0s--> 默认值:1m0s</td >
321
328
</tr >
322
329
<tr >
323
- <td ></td ><td style =" line-height : 130% ; word-wrap : break-word ;" ><p >
330
+ <td ></td ><td style =" line-height : 130% ; word-wrap : break-word ;" >
331
+ <p >
324
332
<!--
325
333
Writes in the storage driver will be buffered for this duration, and committed to the non memory backends as a single transaction
326
334
-->
@@ -332,7 +340,8 @@ Writes in the storage driver will be buffered for this duration, and committed t
332
340
<td colspan =" 2 " >--storage-driver-db string  ;  ;  ;  ;  ; <!-- Default: "cadvisor"--> 默认值:"cadvisor"</td >
333
341
</tr >
334
342
<tr >
335
- <td ></td ><td style =" line-height : 130% ; word-wrap : break-word ;" ><p >
343
+ <td ></td ><td style =" line-height : 130% ; word-wrap : break-word ;" >
344
+ <p >
336
345
<!--
337
346
database name
338
347
-->
@@ -344,7 +353,8 @@ database name
344
353
<td colspan =" 2 " >--storage-driver-host string  ;  ;  ;  ;  ; <!-- Default: "localhost:8086"--> 默认值:"localhost:8086"</td >
345
354
</tr >
346
355
<tr >
347
- <td ></td ><td style =" line-height : 130% ; word-wrap : break-word ;" ><p >
356
+ <td ></td ><td style =" line-height : 130% ; word-wrap : break-word ;" >
357
+ <p >
348
358
<!--
349
359
database host:port
350
360
-->
@@ -356,7 +366,8 @@ database host:port
356
366
<td colspan =" 2 " >--storage-driver-password string  ;  ;  ;  ;  ; <!-- Default: "root"--> 默认值:"root"</td >
357
367
</tr >
358
368
<tr >
359
- <td ></td ><td style =" line-height : 130% ; word-wrap : break-word ;" ><p >
369
+ <td ></td ><td style =" line-height : 130% ; word-wrap : break-word ;" >
370
+ <p >
360
371
<!--
361
372
database password
362
373
-->
@@ -368,7 +379,8 @@ database password
368
379
<td colspan =" 2 " >--storage-driver-secure</td >
369
380
</tr >
370
381
<tr >
371
- <td ></td ><td style =" line-height : 130% ; word-wrap : break-word ;" ><p >
382
+ <td ></td ><td style =" line-height : 130% ; word-wrap : break-word ;" >
383
+ <p >
372
384
<!--
373
385
use secure connection with database
374
386
-->
@@ -380,7 +392,8 @@ use secure connection with database
380
392
<td colspan =" 2 " >--storage-driver-table string  ;  ;  ;  ;  ; <!-- Default: "stats"--> 默认值:"stats"</td >
381
393
</tr >
382
394
<tr >
383
- <td ></td ><td style =" line-height : 130% ; word-wrap : break-word ;" ><p >
395
+ <td ></td ><td style =" line-height : 130% ; word-wrap : break-word ;" >
396
+ <p >
384
397
<!--
385
398
table name
386
399
-->
@@ -392,7 +405,8 @@ table name
392
405
<td colspan =" 2 " >--storage-driver-user string  ;  ;  ;  ;  ; <!-- Default: "root"--> 默认值:"root"</td >
393
406
</tr >
394
407
<tr >
395
- <td ></td ><td style =" line-height : 130% ; word-wrap : break-word ;" ><p >
408
+ <td ></td ><td style =" line-height : 130% ; word-wrap : break-word ;" >
409
+ <p >
396
410
<!--
397
411
database username
398
412
-->
@@ -418,7 +432,8 @@ Server name to use for server certificate validation. If it is not provided, the
418
432
<td colspan =" 2 " >--token string</td >
419
433
</tr >
420
434
<tr >
421
- <td ></td ><td style =" line-height : 130% ; word-wrap : break-word ;" ><p >
435
+ <td ></td ><td style =" line-height : 130% ; word-wrap : break-word ;" >
436
+ <p >
422
437
<!--
423
438
Bearer token for authentication to the API server
424
439
-->
@@ -430,7 +445,8 @@ Bearer token for authentication to the API server
430
445
<td colspan =" 2 " >--user string</td >
431
446
</tr >
432
447
<tr >
433
- <td ></td ><td style =" line-height : 130% ; word-wrap : break-word ;" ><p >
448
+ <td ></td ><td style =" line-height : 130% ; word-wrap : break-word ;" >
449
+ <p >
434
450
<!--
435
451
The name of the kubeconfig user to use
436
452
-->
@@ -442,7 +458,8 @@ The name of the kubeconfig user to use
442
458
<td colspan =" 2 " >--username string</td >
443
459
</tr >
444
460
<tr >
445
- <td ></td ><td style =" line-height : 130% ; word-wrap : break-word ;" ><p >
461
+ <td ></td ><td style =" line-height : 130% ; word-wrap : break-word ;" >
462
+ <p >
446
463
<!--
447
464
Username for basic authentication to the API server
448
465
-->
@@ -454,7 +471,8 @@ Username for basic authentication to the API server
454
471
<td colspan =" 2 " >--version version[=true]</td >
455
472
</tr >
456
473
<tr >
457
- <td ></td ><td style =" line-height : 130% ; word-wrap : break-word ;" ><p >
474
+ <td ></td ><td style =" line-height : 130% ; word-wrap : break-word ;" >
475
+ <p >
458
476
<!--
459
477
--version, --version=raw prints version information and quits; --version=vX.Y.Z... sets the reported version
460
478
-->
@@ -466,7 +484,8 @@ Username for basic authentication to the API server
466
484
<td colspan =" 2 " >--warnings-as-errors</td >
467
485
</tr >
468
486
<tr >
469
- <td ></td ><td style =" line-height : 130% ; word-wrap : break-word ;" ><p >
487
+ <td ></td ><td style =" line-height : 130% ; word-wrap : break-word ;" >
488
+ <p >
470
489
<!--
471
490
Treat warnings received from the server as errors and exit with a non-zero exit code
472
491
-->
@@ -493,5 +512,5 @@ Treat warnings received from the server as errors and exit with a non-zero exit
493
512
* [ kubectl set image] ( kubectl_set_image/ ) - 更新 Pod 模板上的镜像
494
513
* [ kubectl set resources] ( kubectl_set_resources/ ) - 使用 Pod 模板更新对象的资源请求/限制
495
514
* [ kubectl set selector] ( kubectl_set_selector/ ) - 设置资源上的选择器
496
- * [ kubectl set serviceaccount] ( kubectl_set_serviceaccount/ ) - 更新资源的服务帐户
497
- * [ kubectl set subject] ( kubectl_set_subject/ ) - 更新角色绑定或集群角色绑定中的用户、组或服务帐户
515
+ * [ kubectl set serviceaccount] ( kubectl_set_serviceaccount/ ) - 更新资源的服务账号
516
+ * [ kubectl set subject] ( kubectl_set_subject/ ) - 更新角色绑定或集群角色绑定中的用户、组或服务账号
0 commit comments