Skip to content

Commit d7370f5

Browse files
authored
Merge pull request #35247 from windsonsea/adminyhf
[zh-cn] updated /access-authn-authz/service-accounts-admin.md
2 parents c6f19fa + f8aa712 commit d7370f5

File tree

1 file changed

+22
-23
lines changed

1 file changed

+22
-23
lines changed

content/zh-cn/docs/reference/access-authn-authz/service-accounts-admin.md

Lines changed: 22 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,14 @@ weight: 50
1717

1818
<!-- overview -->
1919
<!--
20-
This is a Cluster Administrator guide to service accounts. You should be familiar with
20+
This is a Cluster Administrator guide to service accounts. You should be familiar with
2121
[configuring Kubernetes service accounts](/docs/tasks/configure-pod-container/configure-service-account/).
2222
2323
Support for authorization and user accounts is planned but incomplete. Sometimes
2424
incomplete features are referred to in order to better describe service accounts.
2525
-->
2626
这是一篇针对服务账号的集群管理员指南。你应该熟悉
27-
[配置 Kubernetes 服务账号](/zh/docs/tasks/configure-pod-container/configure-service-account/)
27+
[配置 Kubernetes 服务账号](/zh-cn/docs/tasks/configure-pod-container/configure-service-account/)
2828

2929
对鉴权和用户账号的支持已在规划中,当前并不完备。
3030
为了更好地描述服务账号,有时这些不完善的特性也会被提及。
@@ -56,16 +56,15 @@ Kubernetes 区分用户账号和服务账号的概念,主要基于以下原因
5656
accounts for components of that system. Because service accounts can be created
5757
without many constraints and have namespaced names, such config is portable.
5858
-->
59-
- 用户账号是针对人而言的。 服务账号是针对运行在 Pod 中的进程而言的。
60-
- 用户账号是全局性的。其名称跨集群中名字空间唯一的。服务账号是名字空间作用域的。
59+
- 用户账号是针对人而言的。而服务账号是针对运行在 Pod 中的进程而言的。
60+
- 用户账号是全局性的。其名称在某集群中的所有名字空间中必须是唯一的。服务账号是名字空间作用域的。
6161
- 通常情况下,集群的用户账号可能会从企业数据库进行同步,其创建需要特殊权限,
6262
并且涉及到复杂的业务流程。
63-
服务账号创建有意做得更轻量,允许集群用户为了具体的任务创建服务账号
64-
以遵从权限最小化原则。
63+
服务账号创建有意做得更轻量,允许集群用户为了具体的任务创建服务账号以遵从权限最小化原则。
6564
- 对人员和服务账号审计所考虑的因素可能不同。
66-
- 针对复杂系统的配置包可能包含系统组件相关的各种服务账号的定义。因为服务账号
67-
的创建约束不多并且有名字空间域的名称,这种配置是很轻量的。
68-
65+
- 针对复杂系统的配置包可能包含系统组件相关的各种服务账号的定义。
66+
因为服务账号的创建约束不多并且有名字空间域的名称,这种配置是很轻量的。
67+
6968
<!--
7069
## Service account automation
7170
@@ -77,7 +76,7 @@ Three separate components cooperate to implement the automation around service a
7776
-->
7877
## 服务账号的自动化 {#service-account-automation}
7978

80-
三个独立组件协作完成服务账号相关的自动化
79+
以下三个独立组件协作完成服务账号相关的自动化
8180

8281
- `ServiceAccount` 准入控制器
8382
- Token 控制器
@@ -95,11 +94,11 @@ It acts synchronously to modify pods as they are created or updated. When this p
9594
### ServiceAccount 准入控制器 {#serviceaccount-admission-controller}
9695

9796
对 Pod 的改动通过一个被称为
98-
[准入控制器](/zh/docs/reference/access-authn-authz/admission-controllers/)
97+
[准入控制器](/zh-cn/docs/reference/access-authn-authz/admission-controllers/)
9998
的插件来实现。它是 API 服务器的一部分。
10099
当 Pod 被创建或更新时,它会同步地修改 Pod。
101-
如果该插件处于激活状态(在大多数发行版中都是默认激活的),当 Pod 被创建
102-
或更新时它会进行以下操作
100+
如果该插件处于激活状态(在大多数发行版中都是默认激活的),
101+
当 Pod 被创建或更新时它会进行以下操作
103102

104103
<!--
105104
1. If the pod does not have a `ServiceAccount` set, it sets the `ServiceAccount` to `default`.
@@ -120,9 +119,9 @@ It acts synchronously to modify pods as they are created or updated. When this p
120119
1. 如果前一步中为服务账号令牌创建了卷,则为 Pod 中的每个容器添加一个
121120
`volumeSource`,挂载在其 `/var/run/secrets/kubernetes.io/serviceaccount`
122121
目录下。
123-
1. 如果 Pod 不包含 `imagePullSecrets` 设置,将 `ServiceAccount` 所引用
124-
的服务账号中的 `imagePullSecrets` 信息添加到 Pod 中。
125-
122+
1. 如果 Pod 不包含 `imagePullSecrets` 设置,将 `ServiceAccount`
123+
所引用的服务账号中的 `imagePullSecrets` 信息添加到 Pod 中。
124+
126125
<!--
127126
#### Bound Service Account Token Volume
128127
-->
@@ -133,8 +132,8 @@ It acts synchronously to modify pods as they are created or updated. When this p
133132
<!--
134133
The ServiceAccount admission controller will add the following projected volume instead of a Secret-based volume for the non-expiring service account token created by Token Controller.
135134
-->
136-
ServiceAccount 准入控制器将添加如下投射卷,而不是为令牌控制器
137-
所生成的不过期的服务账号令牌而创建的基于 Secret 的卷。
135+
ServiceAccount 准入控制器将添加如下投射卷,
136+
而不是为令牌控制器所生成的不过期的服务账号令牌而创建的基于 Secret 的卷。
138137

139138
```yaml
140139
- name: kube-api-access-<随机后缀>
@@ -161,7 +160,7 @@ ServiceAccount 准入控制器将添加如下投射卷,而不是为令牌控
161160
This projected volume consists of three sources:
162161
163162
1. A ServiceAccountToken acquired from kube-apiserver via TokenRequest API. It will expire after 1 hour by default or when the pod is deleted. It is bound to the pod and has kube-apiserver as the audience.
164-
1. A ConfigMap containing a CA bundle used for verifying connections to the kube-apiserver. This feature depends on the `RootCAConfigMap` feature gate, which publishes a "kube-root-ca.crt" ConfigMap to every namespace. `RootCAConfigMap` feature gate is graduated to GA in 1.21 and default to true. (This feature will be removed from --feature-gate arg in 1.22).
163+
1. A ConfigMap containing a CA bundle used for verifying connections to the kube-apiserver. This feature depends on the `RootCAConfigMap` feature gate, which publishes a "kube-root-ca.crt" ConfigMap to every namespace. `RootCAConfigMap` feature gate is graduated to GA in 1.21 and default to true. (This flag will be removed from --feature-gate arg in 1.22)
165164
1. A DownwardAPI that references the namespace of the pod.
166165
-->
167166
此投射卷有三个数据源:
@@ -179,7 +178,7 @@ This projected volume consists of three sources:
179178
<!--
180179
See more details about [projected volumes](/docs/tasks/configure-pod-container/configure-projected-volume-storage/).
181180
-->
182-
参阅[投射卷](/zh/docs/tasks/configure-pod-container/configure-projected-volume-storage/)
181+
参阅[投射卷](/zh-cn/docs/tasks/configure-pod-container/configure-projected-volume-storage/)
183182
了解进一步的细节。
184183

185184
<!--
@@ -251,7 +250,7 @@ type: kubernetes.io/service-account-token
251250
```
252251

253252
```shell
254-
kubectl create -f ./secret.json
253+
kubectl create -f ./secret.yaml
255254
kubectl describe secret mysecretname
256255
```
257256

@@ -272,6 +271,6 @@ ensures a ServiceAccount named "default" exists in every active namespace.
272271
-->
273272
### 服务账号控制器 {#serviceaccount-controller}
274273

275-
服务账号控制器管理各名字空间下的 ServiceAccount 对象,并且保证每个活跃的
276-
名字空间下存在一个名为 "default" 的 ServiceAccount。
274+
服务账号控制器管理各名字空间下的 ServiceAccount 对象,
275+
并且保证每个活跃的名字空间下存在一个名为 "default" 的 ServiceAccount。
277276

0 commit comments

Comments
 (0)