From 16a14ebfd1877ba857a12a9ff9871f696c134b7e Mon Sep 17 00:00:00 2001 From: yanrongshi Date: Mon, 5 Sep 2022 22:23:18 +0800 Subject: [PATCH] Update custom-resource-definition-versioning.md --- .../configure-aggregation-layer.md | 49 ++++++++++--------- 1 file changed, 25 insertions(+), 24 deletions(-) diff --git a/content/zh-cn/docs/tasks/extend-kubernetes/configure-aggregation-layer.md b/content/zh-cn/docs/tasks/extend-kubernetes/configure-aggregation-layer.md index 730a5392f6..d02f49af72 100644 --- a/content/zh-cn/docs/tasks/extend-kubernetes/configure-aggregation-layer.md +++ b/content/zh-cn/docs/tasks/extend-kubernetes/configure-aggregation-layer.md @@ -119,8 +119,8 @@ note: kube-apiserver / aggregator -> aggregated apiserver: note: -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 -5.The aggregator sends the user info from step 1 to the aggregated API server as http headers, as defined by the following flags: +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 +5. The aggregator sends the user info from step 1 to the aggregated API server as http headers, as defined by the following flags: * `--requestheader-username-headers` * `--requestheader-group-headers` * `--requestheader-extra-headers-prefix` @@ -271,7 +271,7 @@ The Kubernetes apiserver connects to the extension apiserver over TLS, authentic * private key file via `--proxy-client-key-file` * signed client certificate file via `--proxy-client-cert-file` * certificate of the CA that signed the client certificate file via `--requestheader-client-ca-file` -* valid Common Names (CN) in the signed client certificate via `--requestheader-allowed-names` +* valid Common Name values (CNs) in the signed client certificate via `--requestheader-allowed-names` --> #### Kubernetes Apiserver 客户端认证 @@ -281,13 +281,13 @@ Kubernetes apiserver 通过 TLS 连接到扩展 apiserver,并使用客户端 * 通过 `--proxy-client-key-file` 指定私钥文件 * 通过 `--proxy-client-cert-file` 签名的客户端证书文件 * 通过 `--requestheader-client-ca-file` 签署客户端证书文件的 CA 证书 -* 通过 `--requestheader-allowed-names` 在签署的客户证书中有效的公用名(CN) +* 通过 `--requestheader-allowed-names` 在签署的客户端证书中有效的公用名(CN) Kubernetes apiserver 将使用由 `--proxy-client-*-file` 指示的文件来向扩展 apiserver认证。 为了使合规的扩展 apiserver 能够将该请求视为有效,必须满足以下条件: @@ -295,9 +295,12 @@ Kubernetes apiserver 将使用由 `--proxy-client-*-file` 指示的文件来向 1. 连接必须使用由 CA 签署的客户端证书,该证书的证书位于 `--requestheader-client-ca-file` 中。 2. 连接必须使用客户端证书,该客户端证书的 CN 是 `--requestheader-allowed-names` 中列出的证书之一。 + {{< note >}} -你可以将此选项设置为空白,即为`--requestheader-allowed-names`。 -这将向扩展 apiserver 指示任何 CN 是可接受的。 +你可以将此选项设置为空白,即为`--requestheader-allowed-names=""`。 +这将向扩展 apiserver 指示**任何** CN 是可接受的。 {{< /note >}} @@ -421,7 +424,7 @@ If the `SubjectAccessReview` passes, the extension apiserver executes the reques ## Enable Kubernetes Apiserver flags -Enable the aggregation layer via the following kube-apiserver flags. They may have already been taken care of by your provider. +Enable the aggregation layer via the following `kube-apiserver` flags. They may have already been taken care of by your provider. --> ### 扩展 Apiserver 执行 @@ -429,7 +432,7 @@ Enable the aggregation layer via the following kube-apiserver flags. They may ha ## 启用 Kubernetes Apiserver 标志 -通过以下 kube-apiserver 标志启用聚合层。 +通过以下 `kube-apiserver` 标志启用聚合层。 你的服务提供商可能已经为你完成了这些工作: ``` @@ -457,7 +460,7 @@ Kubernetes apiserver 有两个客户端 CA 选项: 这些功能中的每个功能都是独立的;如果使用不正确,可能彼此冲突。 @@ -555,10 +558,9 @@ it needs to know how to contact it. The `service` stanza is a reference to the service for an extension apiserver. The service namespace and name are required. The port is optional and defaults to 443. -The path is optional and defaults to "/". -Here is an example of an extension apiserver that is configured to be called on port "1234" -at the subpath "/my-path", and to verify the TLS connection against the ServerName +Here is an example of an extension apiserver that is configured to be called on port "1234", +and to verify the TLS connection against the ServerName `my-service-name.my-service-namespace.svc` using a custom CA bundle. --> #### 调用扩展 apiserver @@ -568,13 +570,12 @@ at the subpath "/my-path", and to verify the TLS connection against the ServerNa `service` 部分是对扩展 apiserver 的服务的引用。 服务的名字空间和名字是必需的。端口是可选的,默认为 443。 -路径配置是可选的,默认为 `/`。 -下面是为可在端口 `1234` 上调用的扩展 apiserver 的配置示例 -服务位于子路径 `/my-path` 下,并针对 ServerName +下面是一个扩展 apiserver 的配置示例,它被配置为在端口 `1234` 上调用。 +并针对 ServerName `my-service-name.my-service-namespace.svc` 使用自定义的 CA 包来验证 TLS 连接 -使用自定义 CA 捆绑包的`my-service-name.my-service-namespace.svc`。 +使用自定义 CA 捆绑包的 `my-service-name.my-service-namespace.svc`。 ```yaml apiVersion: apiregistration.k8s.io/v1 @@ -590,12 +591,12 @@ spec: ... ``` -## {{% heading "whatsnext" %}} +## {{% heading "接下来" %}} * 使用聚合层[安装扩展 API 服务器](/zh-cn/docs/tasks/extend-kubernetes/setup-extension-api-server/)。