【问题标题】:Kubernetes HPA with custom metrics in 1.51.5 中具有自定义指标的 Kubernetes HPA
【发布时间】:2017-04-12 18:04:46
【问题描述】:

我有 k8s v1.5 installad,我尝试关注 https://kubernetes.io/docs/tasks/run-application/horizontal-pod-autoscale/ 来实现自定义指标的 HPA。

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

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

这是我的k8s版本信息:

[bow@devvm13 ~]$ 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"}

【问题讨论】:

    标签: kubernetes


    【解决方案1】:

    --horizo​​ntal-pod-autoscaler-use-rest-clients 在 1.6 之后支持。
    你可以参考https://medium.com/@marko.luksa/kubernetes-autoscaling-based-on-custom-metrics-without-using-a-host-port-b783ed6241ac作为例子。

    【讨论】:

    • 我试过了,还是不行。不同的是,页面用的是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
    猜你喜欢
    • 2020-08-15
    • 2020-10-15
    • 2019-08-16
    • 1970-01-01
    • 2021-07-08
    • 1970-01-01
    • 1970-01-01
    • 2018-09-23
    • 2020-01-28
    相关资源
    最近更新 更多