我有一个使用pvc的pod,当我开始部署时,由于本地路径的原因,pvc处于“挂起”状态:配置错误,未指定节点:
Name: grafana-data
Namespace: default
StorageClass: local-path
Status: Pending
Volume:
Labels: io.kompose.service=grafana-data
Annotations: volume.beta.kubernetes.io/storage-provisioner: rancher.io/local-path
volume.kubernetes.io/storage-provisioner: rancher.io/local-path
Finalizers: [kubernetes.io/pvc-protection]
Capacity:
Access Modes:
VolumeMode: Filesystem
Used By: <none>
Events:
Type Reason Age From Message
---- ------ ---- ---- -------
Normal Provisioning 8s rancher.io/local-path_local-path-provisioner-7f68f98c9b-hqf5j_6e774f0a-bb44-4a4e-bfe8-a8781c321cf3 External provisioner is provisioning volume for claim "default/grafana-data"
Warning ProvisioningFailed 8s rancher.io/local-path_local-path-provisioner-7f68f98c9b-hqf5j_6e774f0a-bb44-4a4e-bfe8-a8781c321cf3 failed to provision volume with StorageClass "local-path": configuration error, no node was specified
Normal ExternalProvisioning 8s (x2 over 8s) persistentvolume-controller waiting for a volume to be created, either by external provisioner "rancher.io/local-path" or manually created by system administrator
需要注意的是,我以前使用的是volumeBindingMode:WaitForConsumer并且它在那里工作(因为它等待pod被调度)我理解当使用volumeBindingMode时:立即(就像上面一样)我必须以某种方式指定节点(因为pod还没有被调度),遗憾的是我还没有找到指定它的方法。
1条答案
按热度按时间vlf7wbxs1#
根据警告消息无法调配存储类为"local-path"的卷:配置错误,未指定节点,这可能是因为PodSecurityPolicy未更新为使用本地路径,这可能不允许连接PVC。有关详细信息,请参阅类似的SO & Kubernetes Blog。
更多信息请参考How Rancher's Local Path Provisioner works博客。