Skip to content

Commit d3289e7

Browse files
authored
Merge pull request #49158 from windsonsea/letaut
[zh] Sync kubelet-authn-authz.md and its feature gate
2 parents 8de17de + 6ece581 commit d3289e7

File tree

2 files changed

+92
-15
lines changed

2 files changed

+92
-15
lines changed

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

Lines changed: 73 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
title: Kubelet 认证/鉴权
2+
title: kubelet 认证/鉴权
33
weight: 110
44
---
55
<!--
@@ -18,8 +18,7 @@ weight: 110
1818
A kubelet's HTTPS endpoint exposes APIs which give access to data of varying sensitivity,
1919
and allow you to perform operations with varying levels of power on the node and within containers.
2020
-->
21-
kubelet 的 HTTPS 端点公开了 API,
22-
这些 API 可以访问敏感度不同的数据,
21+
kubelet 的 HTTPS 端点公开了一些 API,这些 API 可以访问敏感度不同的数据,
2322
并允许你在节点上和容器内以不同级别的权限执行操作。
2423

2524
<!--
@@ -30,7 +29,7 @@ This document describes how to authenticate and authorize access to the kubelet'
3029
<!--
3130
## Kubelet authentication
3231
-->
33-
## Kubelet 身份认证 {#kubelet-authentication}
32+
## kubelet 身份认证 {#kubelet-authentication}
3433

3534
<!--
3635
By default, requests to the kubelet's HTTPS endpoint that are not rejected by other configured
@@ -63,12 +62,12 @@ To enable X509 client certificate authentication to the kubelet's HTTPS endpoint
6362
*`--client-ca-file` 标志启动 kubelet,提供一个 CA 证书包以供验证客户端证书
6463
*`--kubelet-client-certificate``--kubelet-client-key` 标志启动 API 服务器
6564
* 有关更多详细信息,请参见
66-
[API 服务器身份验证文档](/zh-cn/docs/reference/access-authn-authz/authentication/#x509-client-certificates)
65+
[API 服务器身份认证文档](/zh-cn/docs/reference/access-authn-authz/authentication/#x509-client-certificates)
6766

6867
<!--
6968
To enable API bearer tokens (including service account tokens) to be used to authenticate to the kubelet's HTTPS endpoint:
7069
-->
71-
要启用 API 持有者令牌(包括服务帐户令牌)以对 kubelet 的 HTTPS 端点进行身份验证,请执行以下操作:
70+
要启用 API 持有者令牌(包括服务账号令牌)以对 kubelet 的 HTTPS 端点进行身份认证,请执行以下操作:
7271

7372
<!--
7473
* ensure the `authentication.k8s.io/v1beta1` API group is enabled in the API server
@@ -82,12 +81,12 @@ To enable API bearer tokens (including service account tokens) to be used to aut
8281
<!--
8382
## Kubelet authorization
8483
-->
85-
## Kubelet 鉴权 {#kubelet-authorization}
84+
## kubelet 鉴权 {#kubelet-authorization}
8685

8786
<!--
8887
Any request that is successfully authenticated (including an anonymous request) is then authorized. The default authorization mode is `AlwaysAllow`, which allows all requests.
8988
-->
90-
任何成功通过身份验证的请求(包括匿名请求)之后都会被鉴权。
89+
任何成功通过身份认证的请求(包括匿名请求)之后都会被鉴权。
9190
默认的鉴权模式为 `AlwaysAllow`,它允许所有请求。
9291

9392
<!--
@@ -100,9 +99,9 @@ There are many possible reasons to subdivide access to the kubelet API:
10099
* bearer token auth is enabled, but arbitrary API users' (like service accounts) ability to call the kubelet API should be limited
101100
* client certificate auth is enabled, but only some of the client certificates signed by the configured CA should be allowed to use the kubelet API
102101
-->
103-
* 启用了匿名身份验证,但是应限制匿名用户调用 kubelet API 的能力
104-
* 启用了持有者令牌认证,但应限制任意 API 用户(如服务帐户)调用 kubelet API 的能力
105-
* 启用了客户端证书身份验证,但仅应允许已配置的 CA 签名的某些客户端证书使用 kubelet API
102+
* 启用了匿名身份认证,但是应限制匿名用户调用 kubelet API 的能力
103+
* 启用了持有者令牌认证,但应限制任意 API 用户(如服务账号)调用 kubelet API 的能力
104+
* 启用了客户端证书身份认证,但仅应允许已配置的 CA 签名的某些客户端证书使用 kubelet API
106105

107106
<!--
108107
To subdivide access to the kubelet API, delegate authorization to the API server:
@@ -122,9 +121,9 @@ To subdivide access to the kubelet API, delegate authorization to the API server
122121
<!--
123122
The kubelet authorizes API requests using the same [request attributes](/docs/reference/access-authn-authz/authorization/#review-your-request-attributes) approach as the apiserver.
124123
-->
125-
kubelet 使用与 API 服务器相同的
126-
[请求属性](/zh-cn/docs/reference/access-authn-authz/authorization/#review-your-request-attributes)
127-
方法对 API 请求执行鉴权。
124+
kubelet 使用与 API
125+
服务器相同的[请求属性](/zh-cn/docs/reference/access-authn-authz/authorization/#review-your-request-attributes)方法对
126+
API 请求执行鉴权。
128127

129128
<!--
130129
The verb is determined from the incoming request's HTTP verb:
@@ -157,7 +156,7 @@ Kubelet API | resource | subresource
157156
/checkpoint/\* | nodes | checkpoint
158157
*all others* | nodes | proxy
159158
-->
160-
Kubelet API | 资源 | 子资源
159+
kubelet API | 资源 | 子资源
161160
-------------|----------|------------
162161
/stats/\* | nodes | stats
163162
/metrics/\* | nodes | metrics
@@ -185,3 +184,62 @@ flags passed to the apiserver is authorized for the following attributes:
185184
* verb=\*, resource=nodes, subresource=log
186185
* verb=\*, resource=nodes, subresource=spec
187186
* verb=\*, resource=nodes, subresource=metrics
187+
188+
<!--
189+
### Fine-grained authorization
190+
-->
191+
### 细粒度鉴权 {#fine-grained-authorization}
192+
193+
{{< feature-state feature_gate_name="KubeletFineGrainedAuthz" >}}
194+
195+
<!--
196+
When the feature gate `KubeletFineGrainedAuthz` is enabled kubelet performs a
197+
fine-grained check before falling back to the `proxy` subresource for the `/pods`,
198+
`/runningPods`, `/configz` and `/healthz` endpoints. The resource and subresource
199+
are determined from the incoming request's path:
200+
-->
201+
当特性门控 `KubeletFineGrainedAuthz` 被启用时,kubelet 处理对
202+
`/pods``/runningPods``/configz``/healthz` 等端点的请求时,在回退到 `proxy` 子资源之前,
203+
会执行一次细粒度的检查。资源和子资源是根据传入请求的路径确定的:
204+
205+
<!--
206+
Kubelet API | resource | subresource
207+
--------------|----------|------------
208+
/stats/\* | nodes | stats
209+
/metrics/\* | nodes | metrics
210+
/logs/\* | nodes | log
211+
/spec/\* | nodes | spec
212+
/pods | nodes | pods, proxy
213+
/runningPods/ | nodes | pods, proxy
214+
/healthz | nodes | healthz, proxy
215+
/configz | nodes | configz, proxy
216+
*all others* | nodes | proxy
217+
-->
218+
kubelet API | 资源 | 子资源
219+
--------------|----------|------------
220+
/stats/\* | nodes | stats
221+
/metrics/\* | nodes | metrics
222+
/logs/\* | nodes | log
223+
/spec/\* | nodes | spec
224+
/pods | nodes | pods, proxy
225+
/runningPods/ | nodes | pods, proxy
226+
/healthz | nodes | healthz, proxy
227+
/configz | nodes | configz, proxy
228+
**其他所有** | nodes | proxy
229+
230+
<!--
231+
When the feature-gate `KubeletFineGrainedAuthz` is enabled, ensure the user
232+
identified by the `--kubelet-client-certificate` and `--kubelet-client-key`
233+
flags passed to the API server is authorized for the following attributes:
234+
-->
235+
当特性门控 `KubeletFineGrainedAuthz` 被启用时,请确保经传递给 API 服务器的
236+
`--kubelet-client-certificate``--kubelet-client-key` 标志所鉴别的用户被授权了以下属性:
237+
238+
* verb=\*, resource=nodes, subresource=proxy
239+
* verb=\*, resource=nodes, subresource=stats
240+
* verb=\*, resource=nodes, subresource=log
241+
* verb=\*, resource=nodes, subresource=spec
242+
* verb=\*, resource=nodes, subresource=metrics
243+
* verb=\*, resource=nodes, subresource=configz
244+
* verb=\*, resource=nodes, subresource=healthz
245+
* verb=\*, resource=nodes, subresource=pods
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
---
2+
title: KubeletFineGrainedAuthz
3+
content_type: feature_gate
4+
_build:
5+
list: never
6+
render: false
7+
8+
stages:
9+
- stage: alpha
10+
defaultValue: false
11+
fromVersion: "1.32"
12+
---
13+
14+
<!--
15+
Enable [fine-grained authorization](/docs/reference/access-authn-authz/kubelet-authn-authz/#fine-grained-authorization)
16+
for the kubelet's HTTP(s) API.
17+
-->
18+
为 kubelet 的 HTTP(s) API
19+
启用[细粒度的鉴权](/zh-cn/docs/reference/access-authn-authz/kubelet-authn-authz/#fine-grained-authorization)

0 commit comments

Comments
 (0)