Skip to content

Commit 455dfdd

Browse files
authored
Merge pull request #55087 from my-git9/npp-21286
[zh-cn]sync kubectl_set_subject
2 parents 685bf90 + 3c88b19 commit 455dfdd

1 file changed

Lines changed: 69 additions & 33 deletions

File tree

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

Lines changed: 69 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,16 @@
22
title: kubectl set subject
33
content_type: tool-reference
44
weight: 30
5+
description: >-
6+
更新角色绑定或集群角色绑定中的用户、组或服务账户
57
---
68
<!--
79
title: kubectl set subject
810
content_type: tool-reference
911
weight: 30
1012
auto_generated: true
13+
description: >-
14+
Update the user, group, or service account in a role binding or cluster role binding
1115
-->
1216

1317
## {{% heading "synopsis" %}}
@@ -59,7 +63,8 @@ kubectl create rolebinding admin --role=admin --user=admin -o yaml --dry-run=cli
5963
<td colspan="2">--all</td>
6064
</tr>
6165
<tr>
62-
<td></td><td style="line-height: 130%; word-wrap: break-word;"><p>
66+
<td></td><td style="line-height: 130%; word-wrap: break-word;">
67+
<p>
6368
<!--
6469
Select all resources, in the namespace of the specified resource types
6570
-->
@@ -72,7 +77,8 @@ Select all resources, in the namespace of the specified resource types
7277
<td colspan="2">--allow-missing-template-keys&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<!--Default:-->默认值:true</td>
7378
</tr>
7479
<tr>
75-
<td></td><td style="line-height: 130%; word-wrap: break-word;"><p>
80+
<td></td><td style="line-height: 130%; word-wrap: break-word;">
81+
<p>
7682
<!--
7783
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.
7884
-->
@@ -86,7 +92,8 @@ If true, ignore any errors in templates when a field or map key is missing in th
8692
<td colspan="2">--dry-run string[="unchanged"]&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<!--Default:-->默认值:"none"</td>
8793
</tr>
8894
<tr>
89-
<td></td><td style="line-height: 130%; word-wrap: break-word;"><p>
95+
<td></td><td style="line-height: 130%; word-wrap: break-word;">
96+
<p>
9097
<!--
9198
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.
9299
-->
@@ -100,7 +107,8 @@ Must be &quot;none&quot;, &quot;server&quot;, or &quot;client&quot;. If client s
100107
<td colspan="2">--field-manager string&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<!--Default:-->默认值:"kubectl-set"</td>
101108
</tr>
102109
<tr>
103-
<td></td><td style="line-height: 130%; word-wrap: break-word;"><p>
110+
<td></td><td style="line-height: 130%; word-wrap: break-word;">
111+
<p>
104112
<!--
105113
Name of the manager used to track field ownership.
106114
-->
@@ -113,7 +121,8 @@ Name of the manager used to track field ownership.
113121
<td colspan="2">-f, --filename strings</td>
114122
</tr>
115123
<tr>
116-
<td></td><td style="line-height: 130%; word-wrap: break-word;"><p>
124+
<td></td><td style="line-height: 130%; word-wrap: break-word;">
125+
<p>
117126
<!--
118127
Filename, directory, or URL to files the resource to update the subjects
119128
-->
@@ -126,7 +135,8 @@ Filename, directory, or URL to files the resource to update the subjects
126135
<td colspan="2">--group strings</td>
127136
</tr>
128137
<tr>
129-
<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>
130140
<!--
131141
Groups to bind to the role
132142
-->
@@ -139,7 +149,8 @@ Groups to bind to the role
139149
<td colspan="2">-h, --help</td>
140150
</tr>
141151
<tr>
142-
<td></td><td style="line-height: 130%; word-wrap: break-word;"><p>
152+
<td></td><td style="line-height: 130%; word-wrap: break-word;">
153+
<p>
143154
<!--
144155
help for subject
145156
-->
@@ -152,7 +163,8 @@ subject 操作的帮助命令。
152163
<td colspan="2">-k, --kustomize string</td>
153164
</tr>
154165
<tr>
155-
<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>
156168
<!--
157169
Process the kustomization directory. This flag can't be used together with -f or -R.
158170
-->
@@ -165,7 +177,8 @@ Process the kustomization directory. This flag can't be used together with -f or
165177
<td colspan="2">--local</td>
166178
</tr>
167179
<tr>
168-
<td></td><td style="line-height: 130%; word-wrap: break-word;"><p>
180+
<td></td><td style="line-height: 130%; word-wrap: break-word;">
181+
<p>
169182
<!--
170183
If true, set subject will NOT contact api-server but run locally.
171184
-->
@@ -178,7 +191,8 @@ If true, set subject will NOT contact api-server but run locally.
178191
<td colspan="2">-o, --output string</td>
179192
</tr>
180193
<tr>
181-
<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>
182196
<!--
183197
Output format. One of: (json, yaml, kyaml, name, go-template, go-template-file, template, templatefile, jsonpath, jsonpath-as-json, jsonpath-file).
184198
-->
@@ -192,7 +206,8 @@ json、yaml、kyaml、name、go-template、go-template-file、template、templat
192206
<td colspan="2">-R, --recursive</td>
193207
</tr>
194208
<tr>
195-
<td></td><td style="line-height: 130%; word-wrap: break-word;"><p>
209+
<td></td><td style="line-height: 130%; word-wrap: break-word;">
210+
<p>
196211
<!--
197212
Process the directory used in -f, --filename recursively. Useful when you want to manage related manifests organized within the same directory.
198213
-->
@@ -221,7 +236,8 @@ Selector (label query) to filter on, supports '=', '==', '!=', 'in', 'notin'.(e.
221236
<td colspan="2">--serviceaccount strings</td>
222237
</tr>
223238
<tr>
224-
<td></td><td style="line-height: 130%; word-wrap: break-word;"><p>
239+
<td></td><td style="line-height: 130%; word-wrap: break-word;">
240+
<p>
225241
<!--
226242
Service accounts to bind to the role
227243
-->
@@ -234,7 +250,8 @@ Service accounts to bind to the role
234250
<td colspan="2">--show-managed-fields</td>
235251
</tr>
236252
<tr>
237-
<td></td><td style="line-height: 130%; word-wrap: break-word;"><p>
253+
<td></td><td style="line-height: 130%; word-wrap: break-word;">
254+
<p>
238255
<!--
239256
If true, keep the managedFields when printing objects in JSON or YAML format.
240257
-->
@@ -247,7 +264,8 @@ If true, keep the managedFields when printing objects in JSON or YAML format.
247264
<td colspan="2">--template string</td>
248265
</tr>
249266
<tr>
250-
<td></td><td style="line-height: 130%; word-wrap: break-word;"><p>
267+
<td></td><td style="line-height: 130%; word-wrap: break-word;">
268+
<p>
251269
<!--
252270
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].
253271
-->
@@ -261,7 +279,8 @@ Template string or path to template file to use when -o=go-template, -o=go-templ
261279
<td colspan="2">--user strings</td>
262280
</tr>
263281
<tr>
264-
<td></td><td style="line-height: 130%; word-wrap: break-word;"><p>
282+
<td></td><td style="line-height: 130%; word-wrap: break-word;">
283+
<p>
265284
<!--
266285
Usernames to bind to the role
267286
-->
@@ -274,7 +293,7 @@ Usernames to bind to the role
274293

275294
## {{% heading "parentoptions" %}}
276295

277-
<table style="width: 100%; table-layout: fixed;">
296+
<table style="width: 100%; table-layout: fixed;">
278297
<colgroup>
279298
<col span="1" style="width: 10px;" />
280299
<col span="1" />
@@ -285,24 +304,28 @@ Usernames to bind to the role
285304
<td colspan="2">--as string</td>
286305
</tr>
287306
<tr>
288-
<td></td><td style="line-height: 130%; word-wrap: break-word;"><p>
307+
<td></td><td style="line-height: 130%; word-wrap: break-word;">
308+
<p>
289309
<!--
290310
Username to impersonate for the operation. User could be a regular user or a service account in a namespace.
291311
-->
292312
操作所用的伪装用户名。用户可以是常规用户或命名空间中的服务账号。
293-
</p></td>
313+
</p>
314+
</td>
294315
</tr>
295316

296317
<tr>
297318
<td colspan="2">--as-group strings</td>
298319
</tr>
299320
<tr>
300-
<td></td><td style="line-height: 130%; word-wrap: break-word;"><p>
321+
<td></td><td style="line-height: 130%; word-wrap: break-word;">
322+
<p>
301323
<!--
302324
Group to impersonate for the operation, this flag can be repeated to specify multiple groups.
303325
-->
304326
操作所用的伪装用户组,此标志可以被重复设置以指定多个组。
305-
</p></td>
327+
</p>
328+
</td>
306329
</tr>
307330

308331
<tr>
@@ -315,7 +338,8 @@ Group to impersonate for the operation, this flag can be repeated to specify mul
315338
UID to impersonate for the operation.
316339
-->
317340
操作所用的伪装 UID。
318-
</p></td>
341+
</p>
342+
</td>
319343
</tr>
320344

321345
<tr>
@@ -342,7 +366,8 @@ User extras to impersonate for the operation, this flag can be repeated to speci
342366
Default cache directory
343367
-->
344368
默认缓存目录。
345-
</p></td>
369+
</p>
370+
</td>
346371
</tr>
347372

348373
<tr>
@@ -355,7 +380,8 @@ Default cache directory
355380
Path to a cert file for the certificate authority
356381
-->
357382
证书机构的证书文件的路径。
358-
</p></td>
383+
</p>
384+
</td>
359385
</tr>
360386

361387
<tr>
@@ -368,7 +394,8 @@ Path to a cert file for the certificate authority
368394
Path to a client certificate file for TLS
369395
-->
370396
TLS 客户端证书文件的路径。
371-
</p></td>
397+
</p>
398+
</td>
372399
</tr>
373400

374401
<tr>
@@ -381,7 +408,8 @@ TLS 客户端证书文件的路径。
381408
Path to a client key file for TLS
382409
-->
383410
TLS 客户端密钥文件的路径。
384-
</p></td>
411+
</p>
412+
</td>
385413
</tr>
386414

387415
<tr>
@@ -394,7 +422,8 @@ TLS 客户端密钥文件的路径。
394422
The name of the kubeconfig cluster to use
395423
-->
396424
要使用的 kubeconfig 中集群的名称。
397-
</p></td>
425+
</p>
426+
</td>
398427
</tr>
399428

400429
<tr>
@@ -407,7 +436,8 @@ The name of the kubeconfig cluster to use
407436
The name of the kubeconfig context to use
408437
-->
409438
要使用的 kubeconfig 上下文的名称。
410-
</p></td>
439+
</p>
440+
</td>
411441
</tr>
412442

413443
<tr>
@@ -420,7 +450,8 @@ The name of the kubeconfig context to use
420450
If true, opt-out of response compression for all requests to the server
421451
-->
422452
如果为 true,则对服务器所有请求的响应不再压缩。
423-
</p></td>
453+
</p>
454+
</td>
424455
</tr>
425456

426457
<tr>
@@ -433,7 +464,8 @@ If true, opt-out of response compression for all requests to the server
433464
If true, the server's certificate will not be checked for validity. This will make your HTTPS connections insecure
434465
-->
435466
如果为 true,则不检查服务器证书的有效性。这将使你的 HTTPS 连接不安全。
436-
</p></td>
467+
</p>
468+
</td>
437469
</tr>
438470

439471
<tr>
@@ -475,7 +507,8 @@ Path to the kuberc file to use for preferences. This can be disabled by exportin
475507
Require server version to match client version
476508
-->
477509
要求服务器版本与客户端版本匹配。
478-
</p></td>
510+
</p>
511+
</td>
479512
</tr>
480513

481514
<tr>
@@ -692,7 +725,8 @@ The name of the kubeconfig user to use
692725
<td colspan="2">--username string</td>
693726
</tr>
694727
<tr>
695-
<td></td><td style="line-height: 130%; word-wrap: break-word;"><p>
728+
<td></td><td style="line-height: 130%; word-wrap: break-word;">
729+
<p>
696730
<!--
697731
Username for basic authentication to the API server
698732
-->
@@ -704,7 +738,8 @@ Username for basic authentication to the API server
704738
<td colspan="2">--version version[=true]</td>
705739
</tr>
706740
<tr>
707-
<td></td><td style="line-height: 130%; word-wrap: break-word;"><p>
741+
<td></td><td style="line-height: 130%; word-wrap: break-word;">
742+
<p>
708743
<!--
709744
--version, --version=raw prints version information and quits; --version=vX.Y.Z... sets the reported version
710745
-->
@@ -716,7 +751,8 @@ Username for basic authentication to the API server
716751
<td colspan="2">--warnings-as-errors</td>
717752
</tr>
718753
<tr>
719-
<td></td><td style="line-height: 130%; word-wrap: break-word;"><p>
754+
<td></td><td style="line-height: 130%; word-wrap: break-word;">
755+
<p>
720756
<!--
721757
Treat warnings received from the server as errors and exit with a non-zero exit code
722758
-->

0 commit comments

Comments
 (0)