Skip to content

Commit 0ffe459

Browse files
authored
Merge pull request #36611 from yanrongshi/zh-cn]Sync-docs/tasks/extend-kubernetes/configure-aggregation-layer.md
[zh] Sync extend-kubernetes/configure-aggregation-layer.md
2 parents e9fdf48 + 16a14eb commit 0ffe459

File tree

1 file changed

+25
-24
lines changed

1 file changed

+25
-24
lines changed

content/zh-cn/docs/tasks/extend-kubernetes/configure-aggregation-layer.md

Lines changed: 25 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -119,8 +119,8 @@ note:
119119
kube-apiserver / aggregator -> aggregated apiserver:
120120
121121
note:
122-
4.The aggregator opens a connection to the aggregated API server using `--proxy-client-cert-file`/`--proxy-client-key-file` client certificate/key to secure the channel
123-
5.The aggregator sends the user info from step 1 to the aggregated API server as http headers, as defined by the following flags:
122+
4. The aggregator opens a connection to the aggregated API server using `--proxy-client-cert-file`/`--proxy-client-key-file` client certificate/key to secure the channel
123+
5. The aggregator sends the user info from step 1 to the aggregated API server as http headers, as defined by the following flags:
124124
* `--requestheader-username-headers`
125125
* `--requestheader-group-headers`
126126
* `--requestheader-extra-headers-prefix`
@@ -271,7 +271,7 @@ The Kubernetes apiserver connects to the extension apiserver over TLS, authentic
271271
* private key file via `--proxy-client-key-file`
272272
* signed client certificate file via `--proxy-client-cert-file`
273273
* certificate of the CA that signed the client certificate file via `--requestheader-client-ca-file`
274-
* valid Common Names (CN) in the signed client certificate via `--requestheader-allowed-names`
274+
* valid Common Name values (CNs) in the signed client certificate via `--requestheader-allowed-names`
275275
-->
276276
#### Kubernetes Apiserver 客户端认证
277277

@@ -281,23 +281,26 @@ Kubernetes apiserver 通过 TLS 连接到扩展 apiserver,并使用客户端
281281
* 通过 `--proxy-client-key-file` 指定私钥文件
282282
* 通过 `--proxy-client-cert-file` 签名的客户端证书文件
283283
* 通过 `--requestheader-client-ca-file` 签署客户端证书文件的 CA 证书
284-
* 通过 `--requestheader-allowed-names` 在签署的客户证书中有效的公用名(CN)
284+
* 通过 `--requestheader-allowed-names` 在签署的客户端证书中有效的公用名(CN)
285285

286286
<!--
287287
The Kubernetes apiserver will use the files indicated by `--proxy-client-*-file` to authenticate to the extension apiserver. In order for the request to be considered valid by a compliant extension apiserver, the following conditions must be met:
288288
289289
1. The connection must be made using a client certificate that is signed by the CA whose certificate is in `--requestheader-client-ca-file`.
290-
2. The connection must be made using a client certificate whose CN is one of those listed in `--requestheader-allowed-names`. **Note:** You can set this option to blank as `--requestheader-allowed-names=""`. This will indicate to an extension apiserver that _any_ CN is acceptable.
290+
2. The connection must be made using a client certificate whose CN is one of those listed in `--requestheader-allowed-names`.
291291
-->
292292
Kubernetes apiserver 将使用由 `--proxy-client-*-file` 指示的文件来向扩展 apiserver认证。
293293
为了使合规的扩展 apiserver 能够将该请求视为有效,必须满足以下条件:
294294

295295
1. 连接必须使用由 CA 签署的客户端证书,该证书的证书位于 `--requestheader-client-ca-file` 中。
296296
2. 连接必须使用客户端证书,该客户端证书的 CN 是 `--requestheader-allowed-names` 中列出的证书之一。
297297

298+
<!--
299+
You can set this option to blank as `--requestheader-allowed-names=""`. This will indicate to an extension apiserver that _any_ CN is acceptable.
300+
-->
298301
{{< note >}}
299-
你可以将此选项设置为空白,即为`--requestheader-allowed-names`
300-
这将向扩展 apiserver 指示任何 CN 是可接受的。
302+
你可以将此选项设置为空白,即为`--requestheader-allowed-names=""`
303+
这将向扩展 apiserver 指示**任何** CN 是可接受的。
301304
{{< /note >}}
302305

303306
<!--
@@ -325,9 +328,9 @@ Kubernetes apiserver 认证。所有扩展 apiserver 请求都重复使用相同
325328
326329
When the Kubernetes apiserver proxies the request to the extension apiserver, it informs the extension apiserver of the username and group with which the original request successfully authenticated. It provides these in http headers of its proxied request. You must inform the Kubernetes apiserver of the names of the headers to be used.
327330
328-
* the header in which to store the username via `-requestheader-username-headers`
329-
* the header in which to store the group via `-requestheader-group-headers`
330-
* the prefix to append to all extra headers via `-requestheader-extra-headers-prefix`
331+
* the header in which to store the username via `--requestheader-username-headers`
332+
* the header in which to store the group via `--requestheader-group-headers`
333+
* the prefix to append to all extra headers via `--requestheader-extra-headers-prefix`
331334
332335
These header names are also placed in the `extension-apiserver-authentication` configmap, so they can be retrieved and used by extension apiservers.
333336
-->
@@ -421,15 +424,15 @@ If the `SubjectAccessReview` passes, the extension apiserver executes the reques
421424
422425
## Enable Kubernetes Apiserver flags
423426
424-
Enable the aggregation layer via the following kube-apiserver flags. They may have already been taken care of by your provider.
427+
Enable the aggregation layer via the following `kube-apiserver` flags. They may have already been taken care of by your provider.
425428
-->
426429
### 扩展 Apiserver 执行
427430

428431
如果 `SubjectAccessReview` 通过,则扩展 apiserver 执行请求。
429432

430433
## 启用 Kubernetes Apiserver 标志
431434

432-
通过以下 kube-apiserver 标志启用聚合层。
435+
通过以下 `kube-apiserver` 标志启用聚合层。
433436
你的服务提供商可能已经为你完成了这些工作:
434437

435438
```
@@ -457,7 +460,7 @@ Kubernetes apiserver 有两个客户端 CA 选项:
457460
<!--
458461
Each of these functions independently and can conflict with each other, if not used correctly.
459462
460-
* `--client-ca-file`: When a request arrives to the Kubernetes apiserver, if this option is enabled, the Kubernetes apiserver checks the certificate of the request. If it is signed by one of the CA certificates in the file referenced by `--client-ca-file`, then the request is treated as a legitimate request, and the user is the value of the common name `CN=`, while the group is the organization `O=`. See the [documentaton on TLS authentication](/docs/reference/access-authn-authz/authentication/#x509-client-certs).
463+
* `--client-ca-file`: When a request arrives to the Kubernetes apiserver, if this option is enabled, the Kubernetes apiserver checks the certificate of the request. If it is signed by one of the CA certificates in the file referenced by `--client-ca-file`, then the request is treated as a legitimate request, and the user is the value of the common name `CN=`, while the group is the organization `O=`. See the [documentation on TLS authentication](/docs/reference/access-authn-authz/authentication/#x509-client-certs).
461464
* `--requestheader-client-ca-file`: When a request arrives to the Kubernetes apiserver, if this option is enabled, the Kubernetes apiserver checks the certificate of the request. If it is signed by one of the CA certificates in the file reference by `--requestheader-client-ca-file`, then the request is treated as a potentially legitimate request. The Kubernetes apiserver then checks if the common name `CN=` is one of the names in the list provided by `--requestheader-allowed-names`. If the name is allowed, the request is approved; if it is not, the request is not.
462465
-->
463466
这些功能中的每个功能都是独立的;如果使用不正确,可能彼此冲突。
@@ -555,10 +558,9 @@ it needs to know how to contact it.
555558
556559
The `service` stanza is a reference to the service for an extension apiserver.
557560
The service namespace and name are required. The port is optional and defaults to 443.
558-
The path is optional and defaults to "/".
559561

560-
Here is an example of an extension apiserver that is configured to be called on port "1234"
561-
at the subpath "/my-path", and to verify the TLS connection against the ServerName
562+
Here is an example of an extension apiserver that is configured to be called on port "1234",
563+
and to verify the TLS connection against the ServerName
562564
`my-service-name.my-service-namespace.svc` using a custom CA bundle.
563565
-->
564566
#### 调用扩展 apiserver
@@ -568,13 +570,12 @@ at the subpath "/my-path", and to verify the TLS connection against the ServerNa
568570

569571
`service` 部分是对扩展 apiserver 的服务的引用。
570572
服务的名字空间和名字是必需的。端口是可选的,默认为 443。
571-
路径配置是可选的,默认为 `/`。
572573

573-
下面是为可在端口 `1234` 上调用的扩展 apiserver 的配置示例
574-
服务位于子路径 `/my-path` 下,并针对 ServerName
574+
下面是一个扩展 apiserver 的配置示例,它被配置为在端口 `1234` 上调用。
575+
并针对 ServerName
575576
`my-service-name.my-service-namespace.svc`
576577
使用自定义的 CA 包来验证 TLS 连接
577-
使用自定义 CA 捆绑包的`my-service-name.my-service-namespace.svc`。
578+
使用自定义 CA 捆绑包的 `my-service-name.my-service-namespace.svc`。
578579

579580
```yaml
580581
apiVersion: apiregistration.k8s.io/v1
@@ -590,12 +591,12 @@ spec:
590591
...
591592
```
592593

593-
## {{% heading "whatsnext" %}}
594+
## {{% heading "接下来" %}}
594595

595596
<!--
596-
* [Setup an extension api-server](/docs/tasks/access-kubernetes-api/setup-extension-api-server/) to work with the aggregation layer.
597-
* For a high level overview, see [Extending the Kubernetes API with the aggregation layer](/docs/concepts/api-extension/apiserver-aggregation/).
598-
* Learn how to [Extend the Kubernetes API Using Custom Resource Definitions](/docs/tasks/access-kubernetes-api/extend-api-custom-resource-definitions/).
597+
* [Set up an extension api-server](/docs/tasks/extend-kubernetes/setup-extension-api-server/) to work with the aggregation layer.
598+
* For a high level overview, see [Extending the Kubernetes API with the aggregation layer](/docs/concepts/extend-kubernetes/api-extension/apiserver-aggregation/).
599+
* Learn how to [Extend the Kubernetes API Using Custom Resource Definitions](/docs/tasks/extend-kubernetes/custom-resources/custom-resource-definitions/).
599600
-->
600601

601602
* 使用聚合层[安装扩展 API 服务器](/zh-cn/docs/tasks/extend-kubernetes/setup-extension-api-server/)。

0 commit comments

Comments
 (0)