【发布时间】:2016-02-07 17:22:33
【问题描述】:
我想使用单个 google 计算引擎 磁盘 并将它安装到多个地方 Kubernetes Google Container Engine。
我想知道使用persistentVolumeClaim 是否可行,但我确实希望能够挂载同一个磁盘的两个分区:
...
volumes:
- name: database
gcePersistentDisk:
pdName: dist-1
fsType: ext4
partition: 1
readOnly: true
- name: media
gcePersistentDisk:
pdName: disk-1
fsType: ext4
partition: 2
readOnly: true
单独安装它们中的任何一个都可以,但是尝试同时安装它们会出错:
FailedMount Unable to mount volumes for pod "frontend-ni7uf_foo": Could not attach GCE PD "disk-1". Timeout waiting for mount paths to be created.
从技术上讲,我可以在一个实例上手动挂载两个分区。
我想知道这是否是一个错误,是否有其他解决方案(除了拥有多个磁盘)?
【问题讨论】:
-
看来PV/PVC并不能解决这个问题,因为当有一个10Gi的PV磁盘时,1Gi的PVC,会导致10Gi的索赔。
-
这是
pdName: dist-1的错字吗?
标签: kubernetes google-kubernetes-engine