部署 Kube State Metrics

2019-12-25  本文已影响0人  凉风有信llm
  1. 克隆代码
$ git clone https://github.com/kubernetes/kube-state-metrics.git --depth 1
  1. 进入目录
$ cd kube-state-metrics/examples
$ ls
autosharding  standard

# 一个是自动分片statefulset版本,一个是标准deployment版,我们选择标准版。
  1. 部署
$ sed -i 's/quay.io/quay.mirrors.ustc.edu.cn/g' standard/deployment.yaml
$ kubectl apply -f standard/
  1. 测试2个端口
$ kubectl run -it --rm --restart=Never --image=radial/busyboxplus:curl --generator=run-pod/v1 curl

# 8080

$ curl -s kube-state-metrics.monitoring:8080/metrics|tail -n 3
# TYPE kube_storageclass_created gauge
# HELP kube_storageclass_labels Kubernetes labels converted to Prometheus labels.
# TYPE kube_storageclass_labels gauge

# 8081

$ curl -s kube-state-metrics.monitoring:8081/metrics|tail -n 3
# HELP process_virtual_memory_max_bytes Maximum amount of virtual memory available in bytes.
# TYPE process_virtual_memory_max_bytes gauge
process_virtual_memory_max_bytes -1
上一篇下一篇

猜你喜欢

热点阅读