问题描述
我在Pod日志中看到以下错误:
I see below error in pod logs:
, the following error information was pulled from the glusterfs log to help diagnose this issue:
[2020-01-10 20:57:47.132637] E [glusterfsd-mgmt.c:1804:mgmt_getspec_cbk] 0-glusterfs: failed to get the 'volume file' from server
[2020-01-10 20:57:47.132690] E [glusterfsd-mgmt.c:1940:mgmt_getspec_cbk] 0-mgmt: failed to fetch volume file (key:vol_32dd7b246275)
我在3台服务器(服务器1、2和3)上安装了glusterfs.我正在使用heketi进行PVC的动态配置. PVC创建成功,但是当我尝试在该卷上装载某些东西时,pod创建显示以下状态:
I have glusterfs installed on three servers - server 1, 2 and 3. I am using heketi to do dynamic provisioning of PVC. PVC creation is successful but pod creation shows below status while I try to mount something on this volume:
kubectl get pods
NAME READY STATUS RESTARTS AGE
test-pod 0/2 ContainerCreating 0 4m22s
推荐答案
不是解决Heketi问题的方法,而是引入了另一种解决方案,以基于Gluster在Kubernetes中提供持久存储.
Not an answer to Heketi's issue, but introducing an alternative solution to provide persistent storage in Kubernetes based on Gluster.
Kadalu Project( https://kadalu.io )是一个基于Gluster的解决方案,无需使用Kubernetes即可进行本机集成Glusterd(Gluster的管理层).
Kadalu Project(https://kadalu.io) is a Gluster based solution which natively integrates with Kubernetes without using Glusterd(Gluster's management layer).
Kadalu仅需两个步骤即可提供Kubernetes存储.
Kadalu provides Kubernetes storage in just two steps.
使用以下命令安装Kadalu Operator,
Install Kadalu Operator using,
$ kubectl create -f https://kadalu.io/operator-latest.yaml
注册您的存储设备,您可以通过其向Kubernetes中运行的应用程序供应持久卷.(使用pip3 install kubectl-kadalu
在主节点中安装Kubectl插件)
Register your storage device, through which you can provision persistent volumes to the applications running in Kubernetes.(Install Kubectl plugin in master node using pip3 install kubectl-kadalu
)
$ kubectl kadalu storage-add storage-pool1 --type Replica3 \
--device node1:/dev/vdc \
--device node2:/dev/vdc \
--device node3:/dev/vdc
就是这样!现在准备进行PV索赔.请参考此链接以快速入门 https://kadalu.io/docs/quick-start
Thats it! Now ready for PV claims. Refer this link for Quick start https://kadalu.io/docs/quick-start
最新博客文章( https://kadalu.io/blog/kadalu-kubernetes-storage )说明了Kadalu可用的不同配置.
Latest blog post(https://kadalu.io/blog/kadalu-kubernetes-storage) explains the different configurations available with Kadalu.
这篇关于glusterfs:无法从服务器获取“卷文件"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!