3
votes

I am trying to setup horizontal pod autoscaling using custom-metrics. For support of custom metrics in kuberenetes 1.8.1, I need to enable the aggregation layer by setting the following flags in kube-apiserver:

--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>

The kubernetes documentation does not contains any information for how to set these flags in api-server and controller manager. I am using azure kubernetes service (AKS).

Not sure but I think one of the possible way to set these flags could be by editing the yaml of kube-apiserver-xxx pod but when I run:

kubectl get po -n kube-system

I get no pod for kube-apiserver neither for kube controller manager.

What is the possible way to set these flags in aks?

I also deployed prometheus adapter for custom metrics but the pod logs showed me the following error:

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

You can see the exact requirements in configuration section in this 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"}
2
Muhammad, did you get any solution for your query? if yes, please update your suggestions and response. We are also trying same.Prakash

2 Answers

1
votes

AKS now supports aggregated API - you can find specific scaling details in the following GitHub comment @ https://github.com/Azure/AKS/issues/77#issuecomment-352926551. Run "az aks upgrade" even to the same Kubernetes version and AKS will update the control plane with the required certificates on the backend.

1
votes

Support for the aggregation layer has been added a couple weeks ago, so no configuration should be necessary for a new cluster. Please see details here: https://github.com/Azure/AKS/issues/54