helm部署prometheus adapter
2021-04-14
添加charts
helm repo add stable https://charts.helm.sh/stable
编辑value.yaml,指定prometheus
vi value.yaml
prometheus:
url: http://prometheus-operated.cattle-prometheus.svc
port: 9090
path: ""
helm部署prometheus到k8s集群
helm install prometheus-adapter stable/prometheus-adapter --values value.yaml --namespace cattle-prometheus
查看
helm list -n cattle-prometheus
访问api获取数据
kubectl get --raw "/apis/metrics.k8s.io/v1beta1/pods" | jq .
参考:
https://support.huaweicloud.com/usermanual-mcp/mcp_01_0057.html