pvc一直处于Pending状态,请问怎么处理?

按照文档上的方式安装pvc后,pvc一直处于Pending状态,消息为waiting for a volume to be created, either by external provisioner “choerodon.io/nfs-client-provisioner” or manually created by system administrator,请问可以怎么处理?

请直接执行下面命令 提供一下nfs-client-provisioner pod的日志

kubectl logs $(kubectl get po -n c7n-system -l choerodon.io/infra=nfs-client-provisioner -o name) -n c7n-system

已经可以了,确认nfs-provisioner的pod已经Running了,但是pvc报
failed to provision volume with StorageClass “nfs-provisioner”

Config File (/export/vfs.conf:53): 1 validation errors in block FSAL
Config File (/export/vfs.conf:53): Errors processing block (FSAL)
Config File (/export/vfs.conf:44): 1 validation errors in block EXPORT
Config File (/export/vfs.conf:44): Errors found in configuration block EXPORT
I1115 14:50:19.884767       1 event.go:221] Event(v1.ObjectReference{Kind:"PersistentVolumeClaim", Namespace:"logging", Name:"elasticsearch-pvc", UID:"3f947b2e-e8e5-11e8-920a-fa163e77372c", APIVersion:"v1", ResourceVersion:"61445", FieldPath:""}): type: 'Warning' reason: 'ProvisioningFailed' failed to provision volume with StorageClass "nfs-provisioner": error creating export for volume: error exporting export block 
EXPORT
{
	Export_Id = 1;
	Path = /export/pvc-3f947b2e-e8e5-11e8-920a-fa163e77372c;
	Pseudo = /export/pvc-3f947b2e-e8e5-11e8-920a-fa163e77372c;
	Access_Type = RW;
	Squash = no_root_squash;
	SecType = sys;
	Filesystem_id = 1.1;
	FSAL {
		Name = VFS;
	}
}

你这两个都执行了的吗?

有的,我没有nfs服务,执行完后已经能在pod看到nfs-provisioner处于Running状态

这些日志是从nfs-provisioner这台服务器打印的

你有NFS服务器吗?

没有的,所以我用第一个,nfs-provisioner处于Running状态

这个你有没有执行?

有的,已经起来了,但是pvc启动报了异常
image

我没有nfs服务,跑的是第一个,第二个没跑

跑的第一个就不可能报出这个错误来哈

这个是之前用错了,已经没有了,现在是下面那个日志问题

这个目录在指定节点手动创建了吗?

我把这个目录改成我自己的磁盘目录了,目录手动建的

helm install c7n/nfs-provisioner \

--set rbac.create=true \

--set service.enabled=true \

--set persistence.enabled=true \

--set persistence.nodeName=fotadevk8s01 \

--set persistence.hostPath=/fotashare/log \

--version 0.1.0 \

--name nfs-provisioner \

--namespace c7n-system

persistence.nodeName 可以是master在get node时的名称吗

image

你把这个pending的 pvc删除掉重新创建试一试 现在看nfs-provisioner是没有问题的