2017-04-12 51 views
1

我有k8s v1.5 installad,我试图跟随https://kubernetes.io/docs/tasks/run-application/horizontal-pod-autoscale/实施具有自定义指标的HPA。Kubernetes HPA自定义指标在1.5

在上面的页面中,它表示控制器管理器上的“--horizontal-pod-autoscaler-use-rest-clients标志设置为true”。但是当我设置它时,控制器管理器无法启动,因为此标志不受支持。

那么我怎样才能找到k8s v1.5的任何指南?

这里是我的K8S版本信息:

[[email protected] ~]$ kubectl version 
Client Version: version.Info{Major:"1", Minor:"5", GitVersion:"v1.5.1", GitCommit:"82450d03cb057bab0950214ef122b67c83fb11df", GitTreeState:"clean", BuildDate:"2016-12-14T00:57:05Z", GoVersion:"go1.7.4", Compiler:"gc", Platform:"linux/amd64"} 
Server Version: version.Info{Major:"1", Minor:"5", GitVersion:"v1.5.0", GitCommit:"58b7c16a52c03e4a849874602be42ee71afdcab1", GitTreeState:"clean", BuildDate:"2016-12-12T23:31:15Z", GoVersion:"go1.7.4", Compiler:"gc", Platform:"linux/amd64"} 

回答

1

--horizo​​ntal-POD-自动配置器使用,其余的客户端是1.6后支持。
您可以参考https://medium.com/@marko.luksa/kubernetes-autoscaling-based-on-custom-metrics-without-using-a-host-port-b783ed6241ac作为示例。

+0

我试过了,它不起作用。不同之处在于,页面使用了minikub,我使用了标准版本。我在kubelet中设置了所有可能的选项:#ps -ef | grep kubelet root 20168 1 4 15:07? 00:10:11/usr/bin/kubelet --kubeconfig =/etc/kubernetes/kubelet.conf --require-kubeconfig = true --pod-manifest-path =/etc/kubernetes/manifests --allow-privileged = true --network-plugin = cni --cni-conf-dir =/etc/cni/net.d --cni-bin-dir =/opt/cni/bin --cluster -dns = 10.96.0.10 --cluster -domain = cluster.local --enable-custom-metrics = true EnableCustomMetrics = true ENABLE_CUSTOM_METRICS = true –