Skip to content

Commit cbaaca9

Browse files
authored
Merge pull request #52374 from my-git9/npa-1808
[zh-cn]sync kubectl_create_configmap.md
2 parents b48397c + a4610f8 commit cbaaca9

File tree

1 file changed

+61
-48
lines changed

1 file changed

+61
-48
lines changed

content/zh-cn/docs/reference/kubectl/generated/kubectl_create/kubectl_create_configmap.md

Lines changed: 61 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ kubectl create configmap NAME [--from-file=[key=]source] [--from-literal=key1=va
7474

7575
## {{% heading "options" %}}
7676

77-
<table style="width: 100%; table-layout: fixed;">
77+
<table style="width: 100%; table-layout: fixed;">
7878
<colgroup>
7979
<col span="1" style="width: 10px;" />
8080
<col span="1" />
@@ -135,7 +135,8 @@ Name of the manager used to track field ownership.
135135
<td colspan="2">--from-env-file strings</td>
136136
</tr>
137137
<tr>
138-
<td></td><td style="line-height: 130%; word-wrap: break-word;"><p>
138+
<td></td><td style="line-height: 130%; word-wrap: break-word;">
139+
<p>
139140
<!--
140141
Specify the path to a file to read lines of key=val pairs to create a configmap.
141142
-->
@@ -147,7 +148,8 @@ Specify the path to a file to read lines of key=val pairs to create a configmap.
147148
<td colspan="2">--from-file strings</td>
148149
</tr>
149150
<tr>
150-
<td></td><td style="line-height: 130%; word-wrap: break-word;"><p>
151+
<td></td><td style="line-height: 130%; word-wrap: break-word;">
152+
<p>
151153
<!--
152154
Key file can be specified using its file path, in which case file basename will be used as configmap key, or optionally with a key and file path, in which case the given key will be used. Specifying a directory will iterate each named file in the directory whose basename is a valid configmap key.
153155
-->
@@ -161,7 +163,8 @@ Key file can be specified using its file path, in which case file basename will
161163
<td colspan="2">--from-literal strings</td>
162164
</tr>
163165
<tr>
164-
<td></td><td style="line-height: 130%; word-wrap: break-word;"><p>
166+
<td></td><td style="line-height: 130%; word-wrap: break-word;">
167+
<p>
165168
<!--
166169
Specify a key and literal value to insert in configmap (i.e. mykey=somevalue)
167170
-->
@@ -173,7 +176,8 @@ Specify a key and literal value to insert in configmap (i.e. mykey=somevalue)
173176
<td colspan="2">-h, --help</td>
174177
</tr>
175178
<tr>
176-
<td></td><td style="line-height: 130%; word-wrap: break-word;"><p>
179+
<td></td><td style="line-height: 130%; word-wrap: break-word;">
180+
<p>
177181
<!--
178182
help for configmap
179183
-->
@@ -185,7 +189,8 @@ configmap 操作的帮助命令。
185189
<td colspan="2">-o, --output string</td>
186190
</tr>
187191
<tr>
188-
<td></td><td style="line-height: 130%; word-wrap: break-word;"><p>
192+
<td></td><td style="line-height: 130%; word-wrap: break-word;">
193+
<p>
189194
<!--
190195
Output format. One of: (json, yaml, name, go-template, go-template-file, template, templatefile, jsonpath, jsonpath-as-json, jsonpath-file).
191196
-->
@@ -198,7 +203,8 @@ json、yaml、name、go-template、go-template-file、template、templatefile、
198203
<td colspan="2">--save-config</td>
199204
</tr>
200205
<tr>
201-
<td></td><td style="line-height: 130%; word-wrap: break-word;"><p>
206+
<td></td><td style="line-height: 130%; word-wrap: break-word;">
207+
<p>
202208
<!--
203209
If true, the configuration of current object will be saved in its annotation. Otherwise, the annotation will be unchanged. This flag is useful when you want to perform kubectl apply on this object in the future.
204210
-->
@@ -211,7 +217,8 @@ If true, the configuration of current object will be saved in its annotation. Ot
211217
<td colspan="2">--show-managed-fields</td>
212218
</tr>
213219
<tr>
214-
<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>
215222
<!--
216223
If true, keep the managedFields when printing objects in JSON or YAML format.
217224
-->
@@ -223,7 +230,8 @@ If true, keep the managedFields when printing objects in JSON or YAML format.
223230
<td colspan="2">--template string</td>
224231
</tr>
225232
<tr>
226-
<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>
227235
<!--
228236
Template string or path to template file to use when -o=go-template, -o=go-template-file. The template format is golang templates [http://golang.org/pkg/text/template/#pkg-overview].
229237
-->
@@ -236,7 +244,8 @@ Template string or path to template file to use when -o=go-template, -o=go-templ
236244
<td colspan="2">--validate string[="strict"]&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<!--Default:-->默认值:"strict"</td>
237245
</tr>
238246
<tr>
239-
<td></td><td style="line-height: 130%; word-wrap: break-word;"><p>
247+
<td></td><td style="line-height: 130%; word-wrap: break-word;">
248+
<p>
240249
<!--
241250
Must be one of: strict (or true), warn, ignore (or false). &quot;true&quot; or &quot;strict&quot; will use a schema to validate the input and fail the request if invalid. It will perform server side validation if ServerSideFieldValidation is enabled on the api-server, but will fall back to less reliable client-side validation if not. &quot;warn&quot; will warn about unknown or duplicate fields without blocking the request if server-side field validation is enabled on the API server, and behave as &quot;ignore&quot; otherwise. &quot;false&quot; or &quot;ignore&quot; will not perform any schema validation, silently dropping any unknown or duplicate fields.
242251
-->
@@ -255,7 +264,7 @@ Must be one of: strict (or true), warn, ignore (or false). &quot;true&quot; or &
255264

256265
## {{% heading "parentoptions" %}}
257266

258-
<table style="width: 100%; table-layout: fixed;">
267+
<table style="width: 100%; table-layout: fixed;">
259268
<colgroup>
260269
<col span="1" style="width: 10px;" />
261270
<col span="1" />
@@ -266,7 +275,8 @@ Must be one of: strict (or true), warn, ignore (or false). &quot;true&quot; or &
266275
<td colspan="2">--as string</td>
267276
</tr>
268277
<tr>
269-
<td></td><td style="line-height: 130%; word-wrap: break-word;"><p>
278+
<td></td><td style="line-height: 130%; word-wrap: break-word;">
279+
<p>
270280
<!--
271281
Username to impersonate for the operation. User could be a regular user or a service account in a namespace.
272282
-->
@@ -278,7 +288,8 @@ Username to impersonate for the operation. User could be a regular user or a ser
278288
<td colspan="2">--as-group strings</td>
279289
</tr>
280290
<tr>
281-
<td></td><td style="line-height: 130%; word-wrap: break-word;"><p>
291+
<td></td><td style="line-height: 130%; word-wrap: break-word;">
292+
<p>
282293
<!--
283294
Group to impersonate for the operation, this flag can be repeated to specify multiple groups.
284295
-->
@@ -290,7 +301,8 @@ Group to impersonate for the operation, this flag can be repeated to specify mul
290301
<td colspan="2">--as-uid string</td>
291302
</tr>
292303
<tr>
293-
<td></td><td style="line-height: 130%; word-wrap: break-word;"><p>
304+
<td></td><td style="line-height: 130%; word-wrap: break-word;">
305+
<p>
294306
<!--
295307
UID to impersonate for the operation.
296308
-->
@@ -302,7 +314,8 @@ UID to impersonate for the operation.
302314
<td colspan="2">--cache-dir string&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<!--Default:-->默认值:"$HOME/.kube/cache"</td>
303315
</tr>
304316
<tr>
305-
<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>
306319
<!--
307320
Default cache directory
308321
-->
@@ -314,7 +327,8 @@ Default cache directory
314327
<td colspan="2">--certificate-authority string</td>
315328
</tr>
316329
<tr>
317-
<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>
318332
<!--
319333
Path to a cert file for the certificate authority
320334
-->
@@ -326,7 +340,8 @@ Path to a cert file for the certificate authority
326340
<td colspan="2">--client-certificate string</td>
327341
</tr>
328342
<tr>
329-
<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>
330345
<!--
331346
Path to a client certificate file for TLS
332347
-->
@@ -338,7 +353,8 @@ TLS 客户端证书文件的路径。
338353
<td colspan="2">--client-key string</td>
339354
</tr>
340355
<tr>
341-
<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>
342358
<!--
343359
Path to a client key file for TLS
344360
-->
@@ -350,7 +366,8 @@ TLS 客户端密钥文件的路径。
350366
<td colspan="2">--cluster string</td>
351367
</tr>
352368
<tr>
353-
<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>
354371
<!--
355372
The name of the kubeconfig cluster to use
356373
-->
@@ -362,43 +379,21 @@ The name of the kubeconfig cluster to use
362379
<td colspan="2">--context string</td>
363380
</tr>
364381
<tr>
365-
<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>
366384
<!--
367385
The name of the kubeconfig context to use
368386
-->
369387
要使用的 kubeconfig 上下文的名称。
370388
</p></td>
371389
</tr>
372390

373-
<tr>
374-
<td colspan="2">--default-not-ready-toleration-seconds int&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<!--Default:-->默认值:300</td>
375-
</tr>
376-
<tr>
377-
<td></td><td style="line-height: 130%; word-wrap: break-word;"><p>
378-
<!--
379-
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.
380-
-->
381-
设置针对 notReady:NoExecute 的容忍度的 tolerationSeconds,默认添加到所有尚未设置此容忍度的 Pod。
382-
</p></td>
383-
</tr>
384-
385-
<tr>
386-
<td colspan="2">--default-unreachable-toleration-seconds int&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<!--Default:-->默认值:300</td>
387-
</tr>
388-
<tr>
389-
<td></td><td style="line-height: 130%; word-wrap: break-word;"><p>
390-
<!--
391-
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.
392-
-->
393-
设置针对 unreachable:NoExecute 的容忍度的 tolerationSeconds,默认添加到所有尚未设置此容忍度的 Pod。
394-
</p></td>
395-
</tr>
396-
397391
<tr>
398392
<td colspan="2">--disable-compression</td>
399393
</tr>
400394
<tr>
401-
<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>
402397
<!--
403398
If true, opt-out of response compression for all requests to the server
404399
-->
@@ -410,7 +405,8 @@ If true, opt-out of response compression for all requests to the server
410405
<td colspan="2">--insecure-skip-tls-verify</td>
411406
</tr>
412407
<tr>
413-
<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>
414410
<!--
415411
If true, the server's certificate will not be checked for validity. This will make your HTTPS connections insecure
416412
-->
@@ -422,19 +418,36 @@ If true, the server's certificate will not be checked for validity. This will ma
422418
<td colspan="2">--kubeconfig string</td>
423419
</tr>
424420
<tr>
425-
<td></td><td style="line-height: 130%; word-wrap: break-word;"><p>
421+
<td></td><td style="line-height: 130%; word-wrap: break-word;">
422+
<p>
426423
<!--
427424
Path to the kubeconfig file to use for CLI requests.
428425
-->
429426
CLI 请求要使用的 kubeconfig 文件的路径。
430427
</p></td>
431428
</tr>
432429

430+
<tr>
431+
<td colspan="2">--kuberc string</td>
432+
</tr>
433+
<tr>
434+
<td></td><td style="line-height: 130%; word-wrap: break-word;">
435+
<p>
436+
<!--
437+
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.
438+
-->
439+
用于偏好设置的 kuberc 文件的路径。可以通过导出 KUBECTL_KUBERC=false
440+
特性门控或关闭 KUBERC=off 特性门控来禁用此功能。
441+
</p>
442+
</td>
443+
</tr>
444+
433445
<tr>
434446
<td colspan="2">--match-server-version</td>
435447
</tr>
436448
<tr>
437-
<td></td><td style="line-height: 130%; word-wrap: break-word;"><p>
449+
<td></td><td style="line-height: 130%; word-wrap: break-word;">
450+
<p>
438451
<!--
439452
Require server version to match client version
440453
-->

0 commit comments

Comments
 (0)