【问题标题】:How to change kubernetes api-server flags [AKS] [Kubernetes 1.8]如何更改 kubernetes api-server 标志 [AKS] [Kubernetes 1.8]
【发布时间】:2023-03-24 01:34:02
【问题描述】:

我正在尝试使用自定义指标设置水平 pod 自动缩放。对于 kuberenetes 1.8.1 中的 support of custom metrics,我需要通过在 kube-apiserver 中设置以下标志来设置 enable the aggregation layer

--requestheader-client-ca-file=<path to aggregator CA cert>
--requestheader-allowed-names=aggregator
--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>

kubernetes 文档不包含有关如何在 api-server 和控制器管理器中设置这些标志的任何信息。我正在使用 azure kubernetes 服务 (AKS)。

不确定,但我认为设置这些标志的一种可能方法是编辑 kube-apiserver-xxx pod 的 yaml,但是当我运行时:

kubectl get po -n kube-system

我没有得到 kube-apiserver 的 pod,kube 控制器管理器也没有。

在 aks 中设置这些标志的可能方法是什么?

我还为自定义指标部署了 prometheus 适配器,但 pod 日志显示以下错误:

panic: cluster doesn't provide requestheader-client-ca-file

您可以在此link 中查看配置部分的确切要求。

kubectl version
Client Version: version.Info{Major:"1", Minor:"8", GitVersion:"v1.8.3", GitCommit:"f0efb3cb883751c5ffdbe6d515f3cb4fbe7b7acd", GitTreeState:"clean", BuildDate:"2017-11-08T18:39:33Z", GoVersion:"go1.8.3", Compiler:"gc", Platform:"linux/amd64"}
Server Version: version.Info{Major:"1", Minor:"8", GitVersion:"v1.8.1", GitCommit:"f38e43b221d08850172a9a4ea785a86a3ffa3b3a", GitTreeState:"clean", BuildDate:"2017-10-11T23:16:41Z", GoVersion:"go1.8.3", Compiler:"gc", Platform:"linux/amd64"}

【问题讨论】:

  • Muhammad,您的查询有什么解决方案吗?如果是,请更新您的建议和回复。我们也在尝试。

标签: azure kubernetes azure-container-service


【解决方案1】:

AKS 现在支持聚合 API - 您可以在以下 GitHub 评论 @https://github.com/Azure/AKS/issues/77#issuecomment-352926551 中找到具体的缩放详细信息。甚至对相同的 Kubernetes 版本运行“az aks upgrade”,AKS 将使用后端所需的证书更新控制平面。

【讨论】:

    【解决方案2】:

    几周前添加了对聚合层的支持,因此新集群无需进行任何配置。请在此处查看详细信息:https://github.com/Azure/AKS/issues/54

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2019-05-12
      • 2020-08-03
      • 1970-01-01
      • 2018-07-29
      • 1970-01-01
      • 2020-09-11
      • 2019-02-05
      • 2021-08-03
      相关资源
      最近更新 更多