Skip to content

Commit ed669c4

Browse files
committed
[zh-cn]sync kubectl_set_image.md
Signed-off-by: xin.li <[email protected]>
1 parent eb6c603 commit ed669c4

File tree

1 file changed

+62
-53
lines changed

1 file changed

+62
-53
lines changed

content/zh-cn/docs/reference/kubectl/generated/kubectl_set/kubectl_set_image.md

Lines changed: 62 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -35,17 +35,17 @@ kubectl set image (-f FILENAME | TYPE NAME) CONTAINER_NAME_1=CONTAINER_IMAGE_1 .
3535

3636
<!--
3737
```
38-
# Set a deployment's nginx container image to 'nginx:1.9.1', and its busybox container image to 'busybox'
39-
kubectl set image deployment/nginx busybox=busybox nginx=nginx:1.9.1
40-
41-
# Update all deployments' and rc's nginx container's image to 'nginx:1.9.1'
42-
kubectl set image deployments,rc nginx=nginx:1.9.1 --all
43-
44-
# Update image of all containers of daemonset abc to 'nginx:1.9.1'
45-
kubectl set image daemonset abc *=nginx:1.9.1
46-
47-
# Print result (in yaml format) of updating nginx container image from local file, without hitting the server
48-
kubectl set image -f path/to/file.yaml nginx=nginx:1.9.1 --local -o yaml
38+
# Set a deployment's nginx container image to 'nginx:1.9.1', and its busybox container image to 'busybox'
39+
kubectl set image deployment/nginx busybox=busybox nginx=nginx:1.9.1
40+
41+
# Update all deployments' and rc's nginx container's image to 'nginx:1.9.1'
42+
kubectl set image deployments,rc nginx=nginx:1.9.1 --all
43+
44+
# Update image of all containers of daemonset abc to 'nginx:1.9.1'
45+
kubectl set image daemonset abc *=nginx:1.9.1
46+
47+
# Print result (in yaml format) of updating nginx container image from local file, without hitting the server
48+
kubectl set image -f path/to/file.yaml nginx=nginx:1.9.1 --local -o yaml
4949
```
5050
-->
5151
```shell
@@ -75,7 +75,8 @@ kubectl set image -f path/to/file.yaml nginx=nginx:1.9.1 --local -o yaml
7575
<td colspan="2">--all</td>
7676
</tr>
7777
<tr>
78-
<td></td><td style="line-height: 130%; word-wrap: break-word;"><p>
78+
<td></td><td style="line-height: 130%; word-wrap: break-word;">
79+
<p>
7980
<!--
8081
Select all resources, in the namespace of the specified resource types
8182
-->
@@ -87,7 +88,8 @@ Select all resources, in the namespace of the specified resource types
8788
<td colspan="2">--allow-missing-template-keys&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<!--Default:-->默认值:true</td>
8889
</tr>
8990
<tr>
90-
<td></td><td style="line-height: 130%; word-wrap: break-word;"><p>
91+
<td></td><td style="line-height: 130%; word-wrap: break-word;">
92+
<p>
9193
<!--
9294
If true, ignore any errors in templates when a field or map key is missing in the template. Only applies to golang and jsonpath output formats.
9395
-->
@@ -100,7 +102,8 @@ If true, ignore any errors in templates when a field or map key is missing in th
100102
<td colspan="2">--dry-run string[="unchanged"]&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<!--Default:-->默认值:"none"</td>
101103
</tr>
102104
<tr>
103-
<td></td><td style="line-height: 130%; word-wrap: break-word;"><p>
105+
<td></td><td style="line-height: 130%; word-wrap: break-word;">
106+
<p>
104107
<!--
105108
Must be &quot;none&quot;, &quot;server&quot;, or &quot;client&quot;. If client strategy, only print the object that would be sent, without sending it. If server strategy, submit server-side request without persisting the resource.
106109
-->
@@ -113,7 +116,8 @@ Must be &quot;none&quot;, &quot;server&quot;, or &quot;client&quot;. If client s
113116
<td colspan="2">--field-manager string&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<!--Default:-->默认值:"kubectl-set"</td>
114117
</tr>
115118
<tr>
116-
<td></td><td style="line-height: 130%; word-wrap: break-word;"><p>
119+
<td></td><td style="line-height: 130%; word-wrap: break-word;">
120+
<p>
117121
<!--
118122
Name of the manager used to track field ownership.
119123
-->
@@ -125,7 +129,8 @@ Name of the manager used to track field ownership.
125129
<td colspan="2">-f, --filename strings</td>
126130
</tr>
127131
<tr>
128-
<td></td><td style="line-height: 130%; word-wrap: break-word;"><p>
132+
<td></td><td style="line-height: 130%; word-wrap: break-word;">
133+
<p>
129134
<!--
130135
Filename, directory, or URL to files identifying the resource to get from a server.
131136
-->
@@ -137,7 +142,8 @@ Filename, directory, or URL to files identifying the resource to get from a serv
137142
<td colspan="2">-h, --help</td>
138143
</tr>
139144
<tr>
140-
<td></td><td style="line-height: 130%; word-wrap: break-word;"><p>
145+
<td></td><td style="line-height: 130%; word-wrap: break-word;">
146+
<p>
141147
<!--
142148
help for image
143149
-->
@@ -149,7 +155,8 @@ image 操作的帮助命令。
149155
<td colspan="2">-k, --kustomize string</td>
150156
</tr>
151157
<tr>
152-
<td></td><td style="line-height: 130%; word-wrap: break-word;"><p>
158+
<td></td><td style="line-height: 130%; word-wrap: break-word;">
159+
<p>
153160
<!--
154161
Process the kustomization directory. This flag can't be used together with -f or -R.
155162
-->
@@ -161,7 +168,8 @@ Process the kustomization directory. This flag can't be used together with -f or
161168
<td colspan="2">--local</td>
162169
</tr>
163170
<tr>
164-
<td></td><td style="line-height: 130%; word-wrap: break-word;"><p>
171+
<td></td><td style="line-height: 130%; word-wrap: break-word;">
172+
<p>
165173
<!--
166174
If true, set image will NOT contact api-server but run locally.
167175
-->
@@ -173,7 +181,8 @@ If true, set image will NOT contact api-server but run locally.
173181
<td colspan="2">-o, --output string</td>
174182
</tr>
175183
<tr>
176-
<td></td><td style="line-height: 130%; word-wrap: break-word;"><p>
184+
<td></td><td style="line-height: 130%; word-wrap: break-word;">
185+
<p>
177186
<!--
178187
Output format. One of: (json, yaml, name, go-template, go-template-file, template, templatefile, jsonpath, jsonpath-as-json, jsonpath-file).
179188
-->
@@ -186,7 +195,8 @@ json、yaml、name、go-template、go-template-file、template、templatefile、
186195
<td colspan="2">-R, --recursive</td>
187196
</tr>
188197
<tr>
189-
<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>
190200
<!--
191201
Process the directory used in -f, --filename recursively. Useful when you want to manage related manifests organized within the same directory.
192202
-->
@@ -214,7 +224,8 @@ Selector (label query) to filter on, supports '=', '==', '!=', 'in', 'notin'.(e.
214224
<td colspan="2">--show-managed-fields</td>
215225
</tr>
216226
<tr>
217-
<td></td><td style="line-height: 130%; word-wrap: break-word;"><p>
227+
<td></td><td style="line-height: 130%; word-wrap: break-word;">
228+
<p>
218229
<!--
219230
If true, keep the managedFields when printing objects in JSON or YAML format.
220231
-->
@@ -226,7 +237,8 @@ If true, keep the managedFields when printing objects in JSON or YAML format.
226237
<td colspan="2">--template string</td>
227238
</tr>
228239
<tr>
229-
<td></td><td style="line-height: 130%; word-wrap: break-word;"><p>
240+
<td></td><td style="line-height: 130%; word-wrap: break-word;">
241+
<p>
230242
<!--
231243
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].
232244
-->
@@ -251,7 +263,8 @@ Template string or path to template file to use when -o=go-template, -o=go-templ
251263
<td colspan="2">--as string</td>
252264
</tr>
253265
<tr>
254-
<td></td><td style="line-height: 130%; word-wrap: break-word;"><p>
266+
<td></td><td style="line-height: 130%; word-wrap: break-word;">
267+
<p>
255268
<!--
256269
Username to impersonate for the operation. User could be a regular user or a service account in a namespace.
257270
-->
@@ -263,7 +276,8 @@ Username to impersonate for the operation. User could be a regular user or a ser
263276
<td colspan="2">--as-group strings</td>
264277
</tr>
265278
<tr>
266-
<td></td><td style="line-height: 130%; word-wrap: break-word;"><p>
279+
<td></td><td style="line-height: 130%; word-wrap: break-word;">
280+
<p>
267281
<!--
268282
Group to impersonate for the operation, this flag can be repeated to specify multiple groups.
269283
-->
@@ -275,7 +289,8 @@ Group to impersonate for the operation, this flag can be repeated to specify mul
275289
<td colspan="2">--as-uid string</td>
276290
</tr>
277291
<tr>
278-
<td></td><td style="line-height: 130%; word-wrap: break-word;"><p>
292+
<td></td><td style="line-height: 130%; word-wrap: break-word;">
293+
<p>
279294
<!--
280295
UID to impersonate for the operation.
281296
-->
@@ -299,7 +314,8 @@ Default cache directory
299314
<td colspan="2">--certificate-authority string</td>
300315
</tr>
301316
<tr>
302-
<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>
303319
<!--
304320
Path to a cert file for the certificate authority
305321
-->
@@ -311,7 +327,8 @@ Path to a cert file for the certificate authority
311327
<td colspan="2">--client-certificate string</td>
312328
</tr>
313329
<tr>
314-
<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>
315332
<!--
316333
Path to a client certificate file for TLS
317334
-->
@@ -323,7 +340,8 @@ TLS 客户端证书文件的路径。
323340
<td colspan="2">--client-key string</td>
324341
</tr>
325342
<tr>
326-
<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>
327345
<!--
328346
Path to a client key file for TLS
329347
-->
@@ -355,30 +373,6 @@ The name of the kubeconfig context to use
355373
</p></td>
356374
</tr>
357375

358-
<tr>
359-
<td colspan="2">--default-not-ready-toleration-seconds int&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<!--Default: 300-->默认值:300</td>
360-
</tr>
361-
<tr>
362-
<td></td><td style="line-height: 130%; word-wrap: break-word;"><p>
363-
<!--
364-
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.
365-
-->
366-
设置针对 notReady:NoExecute 的容忍度的 tolerationSeconds,默认添加到所有尚未设置此容忍度的 Pod。
367-
</p></td>
368-
</tr>
369-
370-
<tr>
371-
<td colspan="2">--default-unreachable-toleration-seconds int&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<!--Default: 300-->默认值:300</td>
372-
</tr>
373-
<tr>
374-
<td></td><td style="line-height: 130%; word-wrap: break-word;"><p>
375-
<!--
376-
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.
377-
-->
378-
设置针对 unreachable:NoExecute 的容忍度的 tolerationSeconds,默认添加到所有尚未设置此容忍度的 Pod。
379-
</p></td>
380-
</tr>
381-
382376
<tr>
383377
<td colspan="2">--disable-compression</td>
384378
</tr>
@@ -415,6 +409,21 @@ CLI 请求要使用的 kubeconfig 文件的路径。
415409
</p></td>
416410
</tr>
417411

412+
<tr>
413+
<td colspan="2">--kuberc string</td>
414+
</tr>
415+
<tr>
416+
<td></td><td style="line-height: 130%; word-wrap: break-word;">
417+
<p>
418+
<!--
419+
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.
420+
-->
421+
用于偏好设置的 kuberc 文件的路径。可以通过导出 KUBECTL_KUBERC=false
422+
特性门控或关闭 KUBERC=off 特性来禁用此功能。
423+
</p>
424+
</td>
425+
</tr>
426+
418427
<tr>
419428
<td colspan="2">--match-server-version</td>
420429
</tr>

0 commit comments

Comments
 (0)