有问题,我无法将我的 pod 容器与持久存储链接
这是我的 pod 的配置,elastic
附加磁盘的名称在哪里(相同的区域,按应安装和格式化),当我使用此配置启动 pod 时出现此错误:
Unable to mount volumes for pod elastic.etcd
我可以将我的容器链接到任何其他类型的卷,emptyDir
或者hostDir
都可以正常工作。但在挂载磁盘的情况下没有。我真的找不到关于persitsentDisk
卷的好例子。
id: elastic
kind: Pod
apiVersion: v1beta1
desiredState:
manifest:
version: v1beta1
id: elastic
volumes:
- name: elastic-persistent-storage
source:
persistentDisk:
pdName : elastic
fsType : ext4
containers:
- name: elastic
image: dockerfile/elasticsearch
cpu: 1000
volumeMounts:
- name: elastic-persistent-storage
mountPath: /data
ports:
- name: elastic
containerPort: 9200
hostPort: 9200
labels:
name: elastic
role: storage
elastic
是同一个项目,同一个区域,附加到集群主节点的磁盘的名称。它也被格式化和安装。
谢谢!