Your Web News in One Place

Help Webnuz

Referal links:

Sign up for GreenGeeks web hosting
December 25, 2022 08:38 am GMT

How to Monitor your k8s Persistent Volume Usage

One of the most critical workloads is the one that has a Persistent volume (PV), PV resources belong to the cluster and exist independently of pods. Any disks and data represented by a PV continues existing even as the cluster changes and pods are deleted and recreated.

It's critical because you want always to make sure this PV always has enough space, you always need to do an analysis and take the right decision, what do you have today and what should be the volume size to meet the future requirements?

Today we will talk about the easy way to see PV utilization which will make you in the right position to take the right decision.

Using Prometheus To Monitor Your PV

One of the most common ways to monitor your K8s resources is to use Prometheus, and Grafana has a very nice dashboard to visualize that.

And here are the steps That you need to follow.

  • Deploy and install Prometheus Using the Prometheus Stack helm chart from here

  • Once you have this ready for your cluster install Grafana from Grafana helm chart from here

  • The last step is to use the Mixin dashboard to visualize the usage of PV, you can get it from here

  • Now you will have a very nice dashboard that you can have a quick look into it and take your decision.

Image description

Very cool, but what about if I don't have monitoring and I still want to make the right decision, here the 2nd solution come.

PV Utilization Using Kubectl-df-pv

A very cool kuectl plugin that you will install and start using to see the utilization of your PV.

  1. Install Kubectl-df-pv Plugin using krew.
curl https://krew.sh/df-pv | bash# . ~/.bashrc   # run if you use bash shell# . ~/.zshrc    # run if you use zsh shell
  1. After installing it use this command to see the utilization of the PV.
kubectl df-pv
  1. The result will be something like the following.

Image description

Very cool, now you can see the utilization of your PV and take the right decision.

Hope that can help you and see you next time

  • Follow me on the following network to get the new blogs in time.
  • Linkedin
  • Twitter

Original Link: https://dev.to/aws-builders/how-to-monitor-your-k8s-persistent-volume-usage-30i5

Share this article:    Share on Facebook
View Full Article

Dev To

An online community for sharing and discovering great ideas, having debates, and making friends

More About this Source Visit Dev To