如何安装heapster或metric服务器以获取kubernetes中的pod指标。我需要这些pod指标将其用于水平pod自动缩放。我正在使用Digital Ocean云集群。
"你需要先下载以下文件:
curl https://raw.githubusercontent.com/kubernetes/heapster/master/deploy/kube-config/influxdb/grafana.yaml > grafana.yaml
curl https://raw.githubusercontent.com/kubernetes/heapster/master/deploy/kube-config/influxdb/heapster.yaml > heapster.yaml
curl https://raw.githubusercontent.com/kubernetes/heapster/master/deploy/kube-config/influxdb/influxdb.yaml > influxdb.yaml
curl https://raw.githubusercontent.com/kubernetes/heapster/master/deploy/kube-config/rbac/heapster-rbac.yaml > heapster-rbac.yaml
然后创建grafana,Influxdb和heapster的以下服务实例:
$ kubectl create -f grafana.yaml
deployment ""monitoring-grafana"" created
service ""monitoring-grafana"" created
$ kubectl create -f heapster.yaml
serviceaccount ""heapster"" created
deployment ""heapster"" created
service ""heapster"" created
$ kubectl create -f influxdb.yaml
deployment ""monitoring-influxdb"" created
service ""monitoring-influxdb"" created
$ kubectl create -f heapster-rbac.yaml
clusterrolebinding ""heapster"" created"
版权声明:本文内容由阿里云实名注册用户自发贡献,版权归原作者所有,阿里云开发者社区不拥有其著作权,亦不承担相应法律责任。具体规则请查看《阿里云开发者社区用户服务协议》和《阿里云开发者社区知识产权保护指引》。如果您发现本社区中有涉嫌抄袭的内容,填写侵权投诉表单进行举报,一经查实,本社区将立刻删除涉嫌侵权内容。