You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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:
124
124
* `--requestheader-username-headers`
125
125
* `--requestheader-group-headers`
126
126
* `--requestheader-extra-headers-prefix`
@@ -271,7 +271,7 @@ The Kubernetes apiserver connects to the extension apiserver over TLS, authentic
271
271
* private key file via `--proxy-client-key-file`
272
272
* signed client certificate file via `--proxy-client-cert-file`
273
273
* 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`
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:
288
288
289
289
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`.
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.
327
330
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`
331
334
332
335
These header names are also placed in the `extension-apiserver-authentication` configmap, so they can be retrieved and used by extension apiservers.
333
336
-->
@@ -421,15 +424,15 @@ If the `SubjectAccessReview` passes, the extension apiserver executes the reques
421
424
422
425
## Enable Kubernetes Apiserver flags
423
426
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.
425
428
-->
426
429
### 扩展 Apiserver 执行
427
430
428
431
如果 `SubjectAccessReview` 通过,则扩展 apiserver 执行请求。
429
432
430
433
## 启用 Kubernetes Apiserver 标志
431
434
432
-
通过以下 kube-apiserver 标志启用聚合层。
435
+
通过以下 `kube-apiserver` 标志启用聚合层。
433
436
你的服务提供商可能已经为你完成了这些工作:
434
437
435
438
```
@@ -457,7 +460,7 @@ Kubernetes apiserver 有两个客户端 CA 选项:
457
460
<!--
458
461
Each of these functions independently and can conflict with each other, if not used correctly.
459
462
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).
461
464
* `--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.
462
465
-->
463
466
这些功能中的每个功能都是独立的;如果使用不正确,可能彼此冲突。
@@ -555,10 +558,9 @@ it needs to know how to contact it.
555
558
556
559
The `service` stanza is a reference to the service for an extension apiserver.
557
560
The service namespace and name are required. The port is optional and defaults to 443.
558
-
The path is optional and defaults to "/".
559
561
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
562
564
`my-service-name.my-service-namespace.svc`using a custom CA bundle.
563
565
-->
564
566
#### 调用扩展 apiserver
@@ -568,13 +570,12 @@ at the subpath "/my-path", and to verify the TLS connection against the ServerNa
568
570
569
571
`service`部分是对扩展 apiserver 的服务的引用。
570
572
服务的名字空间和名字是必需的。端口是可选的,默认为 443。
571
-
路径配置是可选的,默认为 `/`。
572
573
573
-
下面是为可在端口 `1234` 上调用的扩展 apiserver 的配置示例
574
-
服务位于子路径 `/my-path` 下,并针对 ServerName
574
+
下面是一个扩展 apiserver 的配置示例,它被配置为在端口 `1234` 上调用。
575
+
并针对 ServerName
575
576
`my-service-name.my-service-namespace.svc`
576
577
使用自定义的 CA 包来验证 TLS 连接
577
-
使用自定义 CA 捆绑包的`my-service-name.my-service-namespace.svc`。
578
+
使用自定义 CA 捆绑包的`my-service-name.my-service-namespace.svc`。
578
579
579
580
```yaml
580
581
apiVersion: apiregistration.k8s.io/v1
@@ -590,12 +591,12 @@ spec:
590
591
...
591
592
```
592
593
593
-
## {{% heading "whatsnext" %}}
594
+
## {{% heading "接下来" %}}
594
595
595
596
<!--
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/).
599
600
-->
600
601
601
602
* 使用聚合层[安装扩展 API 服务器](/zh-cn/docs/tasks/extend-kubernetes/setup-extension-api-server/)。
0 commit comments