如何识别持久卷声明中剩余的存储空间? [英] How to identify the storage space left in a persistent volume claim?

查看:65
本文介绍了如何识别持久卷声明中剩余的存储空间?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在Google Cloud Platform上有一个Kubernetes集群.它具有容量为1GB的永久批量声明.持久卷声明绑定到许多部署.

I have a Kubernetes cluster on Google Cloud Platform. It has a persistent Volume Claim with a Capacity of 1GB. The persistent volume claim is bound to many deployments.

我想确定永久性批量声明中剩余的空间,以便知道1GB是否足以满足我的应用程序的需求.

I would like to identify the space left in the persistent Volume Claim in order to know if 1GB is sufficient for my application.

我已经使用了命令"kubectl get pv",但这没有显示剩余的存储空间.

I have used the command "kubectl get pv" but this does not show the storage space left.

推荐答案

如果有运行中的吊舱,其PVC中装有PV,

If there's a running pod with mounted PV from the PVC,

kubectl -n <namespace> exec <pod-name> df

...将列出所有文件系统,包括已安装的卷及其可用磁盘空间.

...will list all file systems, including the mounted volumes, and their free disk space.

这篇关于如何识别持久卷声明中剩余的存储空间?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆