Skip to content

Commit 552e535

Browse files
committed
[zh-cn] sync service-accounts.md and serviceaccount link
Signed-off-by: hunshcn <[email protected]>
1 parent 7d1f4aa commit 552e535

File tree

3 files changed

+12
-10
lines changed

3 files changed

+12
-10
lines changed

content/zh-cn/docs/concepts/security/service-accounts.md

+7-5
Original file line numberDiff line numberDiff line change
@@ -474,16 +474,18 @@ API 服务器按照以下方式检查该持有者令牌的有效性:
474474
<!--
475475
The TokenRequest API produces _bound tokens_ for a ServiceAccount. This
476476
binding is linked to the lifetime of the client, such as a Pod, that is acting
477-
as that ServiceAccount.
477+
as that ServiceAccount. See [Token Volume Projection](/docs/tasks/configure-pod-container/configure-service-account/#serviceaccount-token-volume-projection)
478+
for an example of a bound pod service account token's JWT schema and payload.
478479

479480
For tokens issued using the `TokenRequest` API, the API server also checks that
480481
the specific object reference that is using the ServiceAccount still exists,
481482
matching by the {{< glossary_tooltip term_id="uid" text="unique ID" >}} of that
482483
object. For legacy tokens that are mounted as Secrets in Pods, the API server
483484
checks the token against the Secret.
484485
-->
485-
TokenRequest API 为 ServiceAccount 生成**绑定令牌**。这种绑定与以该 ServiceAccount 身份运行的
486-
的客户端(如 Pod)的生命期相关联。
486+
TokenRequest API 为 ServiceAccount 生成**绑定令牌**。这种绑定与以该 ServiceAccount
487+
身份运行的客户端(如 Pod)的生命期相关联。有关绑定 Pod 服务账号令牌的 JWT 模式和载荷的示例,
488+
请参阅[服务账号令牌卷投射](/zh-cn/docs/tasks/configure-pod-container/configure-service-account/#serviceaccount-token-volume-projection)。
487489

488490
对于使用 `TokenRequest` API 签发的令牌,API 服务器还会检查正在使用 ServiceAccount 的特定对象引用是否仍然存在,
489491
方式是通过该对象的{{< glossary_tooltip term_id="uid" text="唯一 ID" >}} 进行匹配。
@@ -516,14 +518,14 @@ account credentials, you can use the following methods:
516518
<!--
517519
The Kubernetes project recommends that you use the TokenReview API, because
518520
this method invalidates tokens that are bound to API objects such as Secrets,
519-
ServiceAccounts, and Pods when those objects are deleted. For example, if you
521+
ServiceAccounts, Pods or Nodes when those objects are deleted. For example, if you
520522
delete the Pod that contains a projected ServiceAccount token, the cluster
521523
invalidates that token immediately and a TokenReview immediately fails.
522524
If you use OIDC validation instead, your clients continue to treat the token
523525
as valid until the token reaches its expiration timestamp.
524526
-->
525527
Kubernetes 项目建议你使用 TokenReview API,因为当你删除某些 API 对象
526-
(如 Secret、ServiceAccount 和 Pod)的时候,此方法将使绑定到这些 API 对象上的令牌失效。
528+
(如 Secret、ServiceAccount、PodNode)的时候,此方法将使绑定到这些 API 对象上的令牌失效。
527529
例如,如果删除包含投射 ServiceAccount 令牌的 Pod,则集群立即使该令牌失效,
528530
并且 TokenReview 操作也会立即失败。
529531
如果你使用的是 OIDC 验证,则客户端将继续将令牌视为有效,直到令牌达到其到期时间戳。

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

+3-3
Original file line numberDiff line numberDiff line change
@@ -594,7 +594,7 @@ myregistrykey
594594
<!--
595595
## ServiceAccount token volume projection
596596
-->
597-
## 服务账号令牌卷投射 {#service-account-token-volume-projection}
597+
## 服务账号令牌卷投射 {#serviceaccount-token-volume-projection}
598598
599599
{{< feature-state for_k8s_version="v1.20" state="stable" >}}
600600
@@ -908,7 +908,7 @@ See also:
908908
- or learn to [distribute credentials securely using Secrets](/docs/tasks/inject-data-application/distribute-credentials-secure/)
909909
- but also bear in mind that using Secrets for authenticating as a ServiceAccount
910910
is deprecated. The recommended alternative is
911-
[ServiceAccount token volume projection](#service-account-token-volume-projection).
911+
[ServiceAccount token volume projection](#serviceaccount-token-volume-projection).
912912
-->
913913
另请参见:
914914

@@ -917,7 +917,7 @@ See also:
917917
- 阅读 [Secret](/zh-cn/docs/concepts/configuration/secret/) 的概念
918918
- 或者学习[使用 Secret 来安全地分发凭据](/zh-cn/docs/tasks/inject-data-application/distribute-credentials-secure/)
919919
- 不过也要注意,使用 Secret 来完成 ServiceAccount 身份验证的做法已经过时。
920-
建议的替代做法是执行 [ServiceAccount 令牌卷投射](#service-account-token-volume-projection)
920+
建议的替代做法是执行 [ServiceAccount 令牌卷投射](#serviceaccount-token-volume-projection)
921921
<!--
922922
- Read about [projected volumes](/docs/tasks/configure-pod-container/configure-projected-volume-storage/).
923923
- For background on OIDC discovery, read the

content/zh-cn/docs/tasks/extend-kubernetes/setup-konnectivity.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ You need to configure the API Server to use the Konnectivity service
4242
and direct the network traffic to the cluster nodes:
4343
4444
1. Make sure that
45-
[Service Account Token Volume Projection](/docs/tasks/configure-pod-container/configure-service-account/#service-account-token-volume-projection)
45+
[Service Account Token Volume Projection](/docs/tasks/configure-pod-container/configure-service-account/#serviceaccount-token-volume-projection)
4646
feature enabled in your cluster. It is enabled by default since Kubernetes v1.20.
4747
1. Create an egress configuration file such as `admin/konnectivity/egress-selector-configuration.yaml`.
4848
1. Set the `--egress-selector-config-file` flag of the API Server to the path of
@@ -51,7 +51,7 @@ your API Server egress configuration file.
5151
-->
5252
你需要配置 API 服务器来使用 Konnectivity 服务,并将网络流量定向到集群节点:
5353

54-
1. 确保[服务账号令牌卷投射](/zh-cn/docs/tasks/configure-pod-container/configure-service-account/#service-account-token-volume-projection)特性被启用。
54+
1. 确保[服务账号令牌卷投射](/zh-cn/docs/tasks/configure-pod-container/configure-service-account/#serviceaccount-token-volume-projection)特性被启用。
5555
该特性自 Kubernetes v1.20 起默认已被启用。
5656
1. 创建一个出站流量配置文件,比如 `admin/konnectivity/egress-selector-configuration.yaml`
5757
1. 将 API 服务器的 `--egress-selector-config-file` 参数设置为你的 API

0 commit comments

Comments
 (0)