在kubernetes集群中使用Helm安装“ consul”后端时,pvc处于“ pending”状态。但是,我可以手动创建pv,pvc,状态为“ BOUND”。
此错误是什么意思? 无法使用StorageClass“精简磁盘”配置卷:指定的数据存储/ kube不是跨节点VM的共享数据存储
使用的storageclass.yaml如下所示。
kind: StorageClass
apiVersion: storage.k8s.io/v1
metadata:
name: thin-disk
annotations:
storageclass.kubernetes.io/is-default-class: "true"
provisioner: kubernetes.io/vsphere-volume
parameters:
datastore: /kube
diskformat: thin
fstype: ext3
使用头盔安装领事时,pvc无法使用存储类(如上)进行自动配置。那么如何手动创建pvc?我需要修改storageclass还是工作节点中缺少任何内容?
root@desktop:~# kubectl describe persistentvolumeclaim/data-consul-vault-callous-armadillo-consul-server-0
Name: data-consul-vault-callous-armadillo-consul-server-0
Namespace: consul-vault
StorageClass: thin-disk
Status: Pending
Volume:
Labels: app=consul
chart=consul-helm
component=server
hasDNS=true
release=callous-armadillo
Annotations: volume.beta.kubernetes.io/storage-provisioner: kubernetes.io/vsphere-volume
Finalizers: [kubernetes.io/pvc-protection]
Capacity:
Access Modes:
Events:
Type Reason Age From Message
---- ------ ---- ---- -------
Warning ProvisioningFailed 36s (x7 over 2m51s) persistentvolume-controller Failed to provision volume with StorageClass "thin-disk": The specified datastore /kube is not a shared datastore across node VMs