Files
website/content/zh/docs/tasks/access-kubernetes-api/configure-aggregation-layer.md
MJ-CJM 5f809f7044 zh-trans: /docs/tasks/_index.md (#11303)
* configure-aggregation-layer.md

* configure-aggregation-layer.md

* configure-aggregation-layer.md

* configure-aggregation-layer.md

* Update configure-aggregation-layer.md

* .

* .

* .

* .

* .

* .

* .

* .

* configure-aggregation-layer.md

* .

* .

* Update configure-aggregation-layer.md
2018-11-29 18:18:18 -08:00

4.1 KiB

title, reviewers, content_template, weight
title reviewers content_template weight
配置聚合层
lavalamp
cheftako
chenopis
templates/task 10

{{% capture overview %}}

配置聚合层允许 Kubernetes apiserver 使用其它 API 进行扩展,这些 API 不是核心 Kubernetes API 的一部分。

{{% /capture %}}

{{% capture prerequisites %}}

{{< include "task-tutorial-prereqs.md" >}} {{< version-check >}}

{{< note >}} 注意: 在您的环境中启用聚合层时,如需要支持代理和扩展 apiserver 之间的双向 TLS 身份验证,需要满足一些设置要求。 Kubernetes 和 kube-apiserver 都有多个 CA,因此要确保代理的证书由聚合层 CA 签署,而不是由其它 CA (如主 CA)来签署。 {{< /note >}}

{{% /capture %}}

{{% capture steps %}}

启用 apiserver 参数

通过以下 kube-apiserver 参数启用聚合层。这一操作可能已由您的供应商完成。

--requestheader-client-ca-file=<path to aggregator CA cert>
--requestheader-allowed-names=front-proxy-client
--requestheader-extra-headers-prefix=X-Remote-Extra-
--requestheader-group-headers=X-Remote-Group
--requestheader-username-headers=X-Remote-User
--proxy-client-cert-file=<path to aggregator proxy cert>
--proxy-client-key-file=<path to aggregator proxy key>

警告:除非您了解 CA 的风险和保护 CA 使用的机制,否则不要在不同的场合重复使用同一 CA。

如果您未在运行 API 服务器的主机上运行 kube-proxy ,则必须确保配置了以下 apiserver 参数:

--enable-aggregator-routing=true

{{% /capture %}}

{{% capture whatsnext %}}

{{% /capture %}}