Skip to content

Commit 04b2715

Browse files
authored
Merge pull request #43344 from windsonsea/nodeyh
[zh] Sync /access-authn-authz/node.md
2 parents 640c323 + 5c1f708 commit 04b2715

File tree

1 file changed

+37
-81
lines changed
  • content/zh-cn/docs/reference/access-authn-authz

1 file changed

+37
-81
lines changed

content/zh-cn/docs/reference/access-authn-authz/node.md

Lines changed: 37 additions & 81 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,11 @@ weight: 90
1616
<!-- overview -->
1717

1818
<!--
19-
Node authorization is a special-purpose authorization mode that specifically authorizes API requests made by kubelets.
19+
Node authorization is a special-purpose authorization mode that specifically
20+
authorizes API requests made by kubelets.
2021
-->
2122
节点鉴权是一种特殊用途的鉴权模式,专门对 kubelet 发出的 API 请求进行授权。
2223

23-
2424
<!-- body -->
2525

2626
<!--
@@ -43,7 +43,8 @@ Read operations:
4343
* endpoints
4444
* nodes
4545
* pods
46-
* secrets, configmaps, persistent volume claims and persistent volumes related to pods bound to the kubelet's node
46+
* secrets, configmaps, persistent volume claims and persistent volumes related
47+
to pods bound to the kubelet's node
4748
-->
4849
* services
4950
* endpoints
@@ -57,8 +58,10 @@ Write operations:
5758
写入操作:
5859

5960
<!--
60-
* nodes and node status (enable the `NodeRestriction` admission plugin to limit a kubelet to modify its own node)
61-
* pods and pod status (enable the `NodeRestriction` admission plugin to limit a kubelet to modify pods bound to itself)
61+
* nodes and node status (enable the `NodeRestriction` admission plugin to limit
62+
a kubelet to modify its own node)
63+
* pods and pod status (enable the `NodeRestriction` admission plugin to limit a
64+
kubelet to modify pods bound to itself)
6265
* events
6366
-->
6467
* 节点和节点状态(启用 `NodeRestriction` 准入插件以限制 kubelet 只能修改自己的节点)
@@ -71,34 +74,45 @@ Auth-related operations:
7174
身份认证与鉴权相关的操作:
7275

7376
<!--
74-
* read/write access to the [CertificateSigningRequests API](/docs/reference/access-authn-authz/certificate-signing-requests/) for TLS bootstrapping
75-
* the ability to create TokenReviews and SubjectAccessReviews for delegated authentication/authorization checks
77+
* read/write access to the
78+
[CertificateSigningRequests API](/docs/reference/access-authn-authz/certificate-signing-requests/)
79+
for TLS bootstrapping
80+
* the ability to create TokenReviews and SubjectAccessReviews for delegated
81+
authentication/authorization checks
7682
-->
7783
* 对于基于 TLS 的启动引导过程时使用的
7884
[certificationsigningrequests API](/zh-cn/docs/reference/access-authn-authz/certificate-signing-requests/)
7985
的读/写权限
8086
* 为委派的身份验证/鉴权检查创建 TokenReview 和 SubjectAccessReview 的能力
8187

8288
<!--
83-
In future releases, the node authorizer may add or remove permissions to ensure kubelets
84-
have the minimal set of permissions required to operate correctly.
89+
In future releases, the node authorizer may add or remove permissions to ensure
90+
kubelets have the minimal set of permissions required to operate correctly.
8591
-->
8692
在将来的版本中,节点鉴权器可能会添加或删除权限,以确保 kubelet 具有正确操作所需的最小权限集。
8793

8894
<!--
89-
In order to be authorized by the Node authorizer, kubelets must use a credential that identifies them as
90-
being in the `system:nodes` group, with a username of `system:node:<nodeName>`.
91-
This group and user name format match the identity created for each kubelet as part of
95+
In order to be authorized by the Node authorizer, kubelets must use a credential
96+
that identifies them as being in the `system:nodes` group, with a username of
97+
`system:node:<nodeName>`.
98+
This group and user name format match the identity created for each kubelet as part of
9299
[kubelet TLS bootstrapping](/docs/reference/access-authn-authz/kubelet-tls-bootstrapping/).
93100
-->
94-
为了获得节点鉴权器的授权,kubelet 必须使用一个凭证以表示它在 `system:nodes`
101+
为了获得节点鉴权器的授权,kubelet 必须使用一个凭据以表示它在 `system:nodes`
95102
组中,用户名为 `system:node:<nodeName>`。上述的组名和用户名格式要与
96103
[kubelet TLS 启动引导](/zh-cn/docs/reference/access-authn-authz/kubelet-tls-bootstrapping/)
97104
过程中为每个 kubelet 创建的标识相匹配。
98105

99106
<!--
100-
The value of `<nodeName>` **must** match precisely the name of the node as registered by the kubelet. By default, this is the host name as provided by `hostname`, or overridden via the [kubelet option](/docs/reference/command-line-tools-reference/kubelet/) `--hostname-override`. However, when using the `--cloud-provider` kubelet option, the specific hostname may be determined by the cloud provider, ignoring the local `hostname` and the `--hostname-override` option.
101-
For specifics about how the kubelet determines the hostname, see the [kubelet options reference](/docs/reference/command-line-tools-reference/kubelet/).
107+
The value of `<nodeName>` **must** match precisely the name of the node as
108+
registered by the kubelet. By default, this is the host name as provided by
109+
`hostname`, or overridden via the
110+
[kubelet option](/docs/reference/command-line-tools-reference/kubelet/)
111+
`--hostname-override`. However, when using the `--cloud-provider` kubelet
112+
option, the specific hostname may be determined by the cloud provider, ignoring
113+
the local `hostname` and the `--hostname-override` option.
114+
For specifics about how the kubelet determines the hostname, see the
115+
[kubelet options reference](/docs/reference/command-line-tools-reference/kubelet/).
102116
-->
103117
`<nodeName>` 的值**必须**与 kubelet 注册的节点名称精确匹配。默认情况下,节点名称是由
104118
`hostname` 提供的主机名,或者通过 kubelet `--hostname-override`
@@ -114,7 +128,10 @@ To enable the Node authorizer, start the apiserver with `--authorization-mode=No
114128
要启用节点鉴权器,请使用 `--authorization-mode=Node` 启动 API 服务器。
115129

116130
<!--
117-
To limit the API objects kubelets are able to write, enable the [NodeRestriction](/docs/reference/access-authn-authz/admission-controllers#NodeRestriction) admission plugin by starting the apiserver with `--enable-admission-plugins=...,NodeRestriction,...`
131+
To limit the API objects kubelets are able to write, enable the
132+
[NodeRestriction](/docs/reference/access-authn-authz/admission-controllers#noderestriction)
133+
admission plugin by starting the apiserver with
134+
`--enable-admission-plugins=...,NodeRestriction,...`
118135
-->
119136
要限制 kubelet 可以写入的 API 对象,请使用
120137
`--enable-admission-plugins=...,NodeRestriction,...` 启动 API 服务器,从而启用
@@ -132,8 +149,9 @@ To limit the API objects kubelets are able to write, enable the [NodeRestriction
132149
### `system:nodes` 组之外的 kubelet {#kubelets-outside-the-system-nodes-group}
133150

134151
<!--
135-
Kubelets outside the `system:nodes` group would not be authorized by the `Node` authorization mode,
136-
and would need to continue to be authorized via whatever mechanism currently authorizes them.
152+
Kubelets outside the `system:nodes` group would not be authorized by the `Node`
153+
authorization mode, and would need to continue to be authorized via whatever
154+
mechanism currently authorizes them.
137155
The node admission plugin would not restrict requests from these kubelets.
138156
-->
139157
`system:nodes` 组之外的 kubelet 不会被 `Node` 鉴权模式授权,并且需要继续通过当前授权它们的机制来授权。
@@ -151,7 +169,7 @@ because they do not have a username in the `system:node:...` format.
151169
These kubelets would not be authorized by the `Node` authorization mode,
152170
and would need to continue to be authorized via whatever mechanism currently authorizes them.
153171
-->
154-
在一些部署中,kubelet 具有 `system:nodes` 组的凭证
172+
在一些部署中,kubelet 具有 `system:nodes` 组的凭据
155173
但是无法给出它们所关联的节点的标识,因为它们没有 `system:node:...` 格式的用户名。
156174
这些 kubelet 不会被 `Node` 鉴权模式授权,并且需要继续通过当前授权它们的任何机制来授权。
157175

@@ -161,65 +179,3 @@ since the default node identifier implementation would not consider that a node
161179
-->
162180
因为默认的节点标识符实现不会把它当作节点身份标识,`NodeRestriction`
163181
准入插件会忽略来自这些 kubelet 的请求。
164-
165-
<!--
166-
### Upgrades from previous versions using RBAC
167-
-->
168-
### 相对于以前使用 RBAC 的版本的更新 {#upgrades-from-previous-versions-using-rbac}
169-
170-
<!--
171-
Upgraded pre-1.7 clusters using [RBAC](/docs/reference/access-authn-authz/rbac/) will continue functioning as-is because the `system:nodes` group binding will already exist.
172-
-->
173-
升级的 1.7 之前的使用 [RBAC](/zh-cn/docs/reference/access-authn-authz/rbac/)
174-
的集群将继续按原样运行,因为 `system:nodes` 组绑定已经存在。
175-
176-
<!--
177-
If a cluster admin wishes to start using the `Node` authorizer and `NodeRestriction` admission plugin
178-
to limit node access to the API, that can be done non-disruptively:
179-
-->
180-
如果集群管理员希望开始使用 `Node` 鉴权器和 `NodeRestriction` 准入插件来限制节点对
181-
API 的访问,这一需求可以通过下列操作来完成且不会影响已部署的应用:
182-
183-
<!--
184-
1. Enable the `Node` authorization mode (`--authorization-mode=Node,RBAC`) and the `NodeRestriction` admission plugin
185-
2. Ensure all kubelets' credentials conform to the group/username requirements
186-
3. Audit apiserver logs to ensure the `Node` authorizer is not rejecting requests from kubelets (no persistent `NODE DENY` messages logged)
187-
4. Delete the `system:node` cluster role binding
188-
-->
189-
1. 启用 `Node` 鉴权模式 (`--authorization-mode=Node,RBAC`) 和 `NodeRestriction` 准入插件
190-
2. 确保所有 kubelet 的凭据符合组/用户名要求
191-
3. 审核 API 服务器日志以确保 `Node` 鉴权器不会拒绝来自 kubelet 的请求(日志中没有持续的 `NODE DENY` 消息)
192-
4. 删除 `system:node` 集群角色绑定
193-
194-
<!--
195-
### RBAC Node Permissions
196-
-->
197-
### RBAC 节点权限 {#rbac-node-permissions}
198-
199-
<!--
200-
In 1.6, the `system:node` cluster role was automatically bound to the `system:nodes` group when using the [RBAC Authorization mode](/docs/reference/access-authn-authz/rbac/).
201-
-->
202-
在 1.6 版本中,当使用 [RBAC 鉴权模式](/zh-cn/docs/reference/access-authn-authz/rbac/)
203-
时,`system:nodes` 集群角色会被自动绑定到 `system:node` 组。
204-
205-
<!--
206-
In 1.7, the automatic binding of the `system:nodes` group to the `system:node` role is deprecated
207-
because the node authorizer accomplishes the same purpose with the benefit of additional restrictions
208-
on secret and configmap access. If the `Node` and `RBAC` authorization modes are both enabled,
209-
the automatic binding of the `system:nodes` group to the `system:node` role is not created in 1.7.
210-
-->
211-
在 1.7 版本中,不再推荐将 `system:nodes` 组自动绑定到 `system:node`
212-
角色,因为节点鉴权器通过对 Secret 和 ConfigMap 访问的额外限制完成了相同的任务。
213-
如果同时启用了 `Node``RBAC` 鉴权模式,1.7 版本则不会创建 `system:nodes`
214-
组到 `system:node` 角色的自动绑定。
215-
216-
<!--
217-
In 1.8, the binding will not be created at all.
218-
-->
219-
在 1.8 版本中,绑定将根本不会被创建。
220-
221-
<!--
222-
When using RBAC, the `system:node` cluster role will continue to be created,
223-
for compatibility with deployment methods that bind other users or groups to that role.
224-
-->
225-
使用 RBAC 时,将继续创建 `system:node` 集群角色,以便与将其他用户或组绑定到该角色的部署方法兼容。

0 commit comments

Comments
 (0)