Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/google-cloud-platform/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Kubernetes GKE一个文件存储上有多个PersistentVolumeClaims_Kubernetes_Google Cloud Platform_Google Kubernetes Engine_Google Cloud Filestore - Fatal编程技术网

Kubernetes GKE一个文件存储上有多个PersistentVolumeClaims

Kubernetes GKE一个文件存储上有多个PersistentVolumeClaims,kubernetes,google-cloud-platform,google-kubernetes-engine,google-cloud-filestore,Kubernetes,Google Cloud Platform,Google Kubernetes Engine,Google Cloud Filestore,我需要帮助了解我的谷歌文件存储问题 我创建了一个带有基本硬盘和1TB存储的Filestore实例。在GKE中,我设置了一个PersistentVolume,如下所示: apiVersion:v1 种类:PersistentVolume 元数据: 姓名:我的文件共享 规格: 容量: 储存量:1吨 访问模式: -读写 nfs: 路径:/fileshare 服务器:xxx.xxx.xxx.xxx 我的问题是,我可以从这个1TB创建多个PersistentVolumeClaims吗?就像多个使用100

我需要帮助了解我的谷歌文件存储问题

我创建了一个带有基本硬盘和1TB存储的Filestore实例。在GKE中,我设置了一个PersistentVolume,如下所示:

apiVersion:v1 种类:PersistentVolume 元数据: 姓名:我的文件共享 规格: 容量: 储存量:1吨 访问模式: -读写 nfs: 路径:/fileshare 服务器:xxx.xxx.xxx.xxx
我的问题是,我可以从这个1TB创建多个PersistentVolumeClaims吗?就像多个使用100GB的PVC一样?

我现在已经自己测试过了

PV和PVC具有1:1的关系。每个PersistentVolume只能承载一个PersistentVolumeClaim

但是您可以创建多个PersistentVolume!例如,如果要将
1TB
(HDD实例的最小值)拆分为5个相等的部分,只需创建5个使用相同文件共享的具有不同名称的PersistentVolume。只需从我的问题中提取脚本,更改名称并将大小缩小到
200G
。Tada,您已经将Filestore实例拆分为5个PersistentVolume,现在可以将其用于不同的目的