2017-04-12 30 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 –