How to monitor kubernetes persistence volume claim i.e disk usage

10/25/2019

Currently I am using Kubernetes v1.11.6. I deployed kubernetes in AWS by using KOPS. In k8s cluster, deployed kafka, elasticsearch.

PVC for kafka and elasticsearch are EBS volumes in AWS.

My question is how to monitor PVC used and remaining available.

This did not worked, How to monitor disk usage of kubernetes persistent volumes? They no longer seem to be exposed starting from 1.12

I thought of using aws cloudwatch but I am thinking kubernetes will have some answer for this generic problem.

I should be able to see PVC used and remaining available disk space

-- Ram
amazon-web-services
aws-ebs
kubernetes
persistent-volume-claims
persistent-volumes

1 Answer

10/25/2019

generally speaking you can monitor following metrics:

kubelet_volume_stats_capacity_bytes
kubelet_volume_stats_available_bytes

These metrics can be scraped from the kubelet endpoint on each node with tools like Prometheus :)

-- Stepan Vrany
Source: StackOverflow