有问题,我不能持久存储链接到我的荚容器永久存储在kubernetes容器
这是我的吊舱,其中elastic
是连接的磁盘(同一区域的名称,安装和格式化的配置如应),当我开始荚这个配置我有这样的错误:
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
是在同一项目中,相同的区域中的磁盘的名称和连接到claster的主节点。它也被格式化和安装。
谢谢!
第一次运行,但现在当我再次删除并重新启动同一个窗格时,它会冻结在待处理状态,我认为窗格当前不应该用作存储服务(可能稍后),它会更好现在要创建通用虚拟机实例来包含这样的服务,我说得对吗? – baio 2014-12-05 17:26:28
这应该工作。删除该容器可能没有从原始机器卸载该磁盘。 我会尝试重新渲染,看看是否有错误。 – brendan 2014-12-05 19:43:09
https://github.com/GoogleCloudPlatform/kubernetes/issues/2766提交 – brendan 2014-12-05 19:43:54