Skip to content

Commit 04cbb6b

Browse files
committed
[zh] Sync web page for config service account
This is for part of the items in the following umbrella issue: [zh] Umbrella issue: pages out of sync in tasks section #26178 Service Account (L) content/zh/docs/tasks/configure-pod-container/configure-service-account.md
1 parent 9ade714 commit 04cbb6b

File tree

1 file changed

+44
-11
lines changed

1 file changed

+44
-11
lines changed

content/zh/docs/tasks/configure-pod-container/configure-service-account.md

Lines changed: 44 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,14 @@ You can list this and any other serviceAccount resources in the namespace with t
125125

126126
```shell
127127
kubectl get serviceAccounts
128+
```
129+
130+
<!--
131+
The output is similar to this:
132+
-->
133+
输出类似于:
134+
135+
```
128136
NAME SECRETS AGE
129137
default 1 1d
130138
```
@@ -141,16 +149,30 @@ kind: ServiceAccount
141149
metadata:
142150
name: build-robot
143151
EOF
144-
serviceaccount/build-robot created
145152
```
146153

154+
<!--
155+
The name of a ServiceAccount object must be a valid
156+
[DNS subdomain name](/docs/concepts/overview/working-with-objects/names#dns-subdomain-names).
157+
-->
158+
ServiceAccount 对象的名字必须是一个有效的
159+
[DNS 子域名](/zh/docs/concepts/overview/working-with-objects/names#dns-subdomain-names).
160+
147161
<!--
148162
If you get a complete dump of the service account object, like this:
149163
-->
150164
如果你查询服务帐户对象的完整信息,如下所示:
151165

152166
```shell
153167
kubectl get serviceaccounts/build-robot -o yaml
168+
```
169+
170+
<!--
171+
The output is similar to this:
172+
-->
173+
输出类似于:
174+
175+
```yaml
154176
apiVersion: v1
155177
kind: ServiceAccount
156178
metadata:
@@ -229,6 +251,14 @@ Any tokens for non-existent service accounts will be cleaned up by the token con
229251

230252
```shell
231253
kubectl describe secrets/build-robot-secret
254+
```
255+
256+
<!--
257+
The output is similar to this:
258+
-->
259+
输出类似于:
260+
261+
```
232262
Name: build-robot-secret
233263
Namespace: default
234264
Labels: <none>
@@ -384,23 +414,26 @@ myregistrykey
384414
-->
385415
## 服务帐户令牌卷投射 {#service-account-token-volume-projection}
386416
387-
{{< feature-state for_k8s_version="v1.12" state="beta" >}}
417+
{{< feature-state for_k8s_version="v1.20" state="stable" >}}
388418
389419
<!--
390-
This ServiceAccountTokenVolumeProjection is __beta__ in 1.12 and
391-
enabled by passing all of the following flags to the API server:
420+
To enable and use token request projection, you must specify each of the following
421+
command line arguments to `kube-apiserver`:
392422
393423
* `--service-account-issuer`
424+
* `--service-account-key-file`
394425
* `--service-account-signing-key-file`
395-
* `--service-account-api-audiences`
426+
* `--api-audiences`
427+
396428
-->
397429
{{< note >}}
398-
ServiceAccountTokenVolumeProjection 在 1.12 版本中是 __beta__ 阶段,
399-
可以通过向 API 服务器传递以下所有参数来启用它:
430+
为了启用令牌请求投射,你必须为 `kube-apiserver` 设置以下命令行参数:
400431
401432
* `--service-account-issuer`
433+
* `--service-account-key-file`
402434
* `--service-account-signing-key-file`
403-
* `--service-account-api-audiences`
435+
* `--api-audiences`
436+
404437
{{< /note >}}
405438
406439
<!--
@@ -438,7 +471,8 @@ kubectl create -f https://k8s.io/examples/pods/pod-projected-svc-token.yaml
438471

439472
<!--
440473
The kubelet will request and store the token on behalf of the pod, make the
441-
token available to the pod at a configurable file path, and refresh the token as it approaches expiration. Kubelet proactively rotates the token if it is older than 80% of its total TTL, or if the token is older than 24 hours.
474+
token available to the pod at a configurable file path, and refresh the token as it approaches expiration.
475+
The kubelet proactively rotates the token if it is older than 80% of its total TTL, or if the token is older than 24 hours.
442476
443477
The application is responsible for reloading the token when it rotates. Periodic reloading (e.g. once every 5 minutes) is sufficient for most use cases.
444478
-->
@@ -455,7 +489,7 @@ The application is responsible for reloading the token when it rotates. Periodic
455489
-->
456490
## 发现服务账号分发者
457491

458-
{{< feature-state for_k8s_version="v1.18" state="alpha" >}}
492+
{{< feature-state for_k8s_version="v1.20" state="beta" >}}
459493

460494
<!--
461495
The Service Account Issuer Discovery feature is enabled by enabling the
@@ -572,4 +606,3 @@ See also:
572606
- [服务账号的集群管理员指南](/zh/docs/reference/access-authn-authz/service-accounts-admin/)
573607
- [服务账号签署密钥检索 KEP](https://github.com/kubernetes/enhancements/blob/master/keps/sig-auth/20190730-oidc-discovery.md)
574608
- [OIDC 发现规范](https://openid.net/specs/openid-connect-discovery-1_0.html)
575-

0 commit comments

Comments
 (0)