kubernetes dynamic pvc / monitoring usage

时间:2018-02-03 10:30:55

标签: kubernetes google-cloud-platform storage

Is there a simple way to get the current attached volume state (think "space left on disk", or the opposite) ? Using stackdriver, this info is not provided. Not to be found neither within the gcloud console. I was wondering if this was accessible besides connecting to the instance and check it manually

2 个答案:

答案 0 :(得分:2)

检查Prometeus

此刻此选项可通过Kubernetes获得,但仅适用于1.8版本。 您可以查看here,其中包含有关此功能请求的完整主题以及实现这些功能的the code

Kubernetes 1.8公开了普罗米修斯的指标。

  • kubelet_volume_stats_available_bytes
  • kubelet_volume_stats_capacity_bytes
  • kubelet_volume_stats_inodes
  • kubelet_volume_stats_inodes_free
  • kubelet_volume_stats_inodes_used
  • kubelet_volume_stats_used_bytes

指标的来源link

答案 1 :(得分:0)

Prometheus,Prometheus Operator,Alertmanager和Grafana

根据您的Kubernetes版本,您可以使用这些非常容易安装的设置:

普罗米修斯1.x link

普罗米修斯2.x link

我推荐普罗米修斯2