添加链接
link之家
链接快照平台
  • 输入网页链接,自动生成快照
  • 标签化管理网页链接
Collectives™ on Stack Overflow

Find centralized, trusted content and collaborate around the technologies you use most.

Learn more about Collectives

Teams

Q&A for work

Connect and share knowledge within a single location that is structured and easy to search.

Learn more about Teams

Today when I create the PVC and PV in kubernetes cluster v1.15.x, the kubernetes dashboard shows the PVC is in lost state, this is the error message of PVC:

this claim is in lost state.

this is my PVC define:

"kind": "PersistentVolumeClaim", "apiVersion": "v1", "metadata": { "name": "zhuolian-report-mysql-pv-claim", "namespace": "dabai-uat", "selfLink": "/api/v1/namespaces/dabai-uat/persistentvolumeclaims/zhuolian-report-mysql-pv-claim", "uid": "3ca3425b-b2dc-4bd7-876f-05f8cbcafcf8", "resourceVersion": "106652242", "creationTimestamp": "2021-09-26T02:58:32Z", "annotations": { "pv.kubernetes.io/bind-completed": "yes" "finalizers": [ "kubernetes.io/pvc-protection" "spec": { "accessModes": [ "ReadWriteOnce" "resources": { "requests": { "storage": "8Gi" "volumeName": "nfs-zhuolian-report-mysql-pv", "volumeMode": "Filesystem" "status": { "phase": "Lost"

and this is my PV define in the same namespace:

"kind": "PersistentVolume", "apiVersion": "v1", "metadata": { "name": "nfs-zhuolian-report-mysql-pv", "selfLink": "/api/v1/persistentvolumes/nfs-zhuolian-report-mysql-pv", "uid": "86291e89-8360-4d48-bae7-62c3c642e945", "resourceVersion": "106652532", "creationTimestamp": "2021-09-26T03:01:02Z", "labels": { "alicloud-pvname": "zhuolian-report-data" "finalizers": [ "kubernetes.io/pv-protection" "spec": { "capacity": { "storage": "8Gi" "nfs": { "server": "balabala.cn-hongkong.nas.balabala.com", "path": "/docker/mysql_zhuolian_report_data" "accessModes": [ "ReadWriteOnce" "claimRef": { "kind": "PersistentVolumeClaim", "namespace": "dabai-uat", "name": "zhuolian-report-mysql-pv-claim" "persistentVolumeReclaimPolicy": "Retain", "mountOptions": [ "vers=4.0", "noresvport" "volumeMode": "Filesystem" "status": { "phase": "Available"

what should I do do fix this problem? how to avoid problem like this? what may cause this problem?

try to delete the PVC's annoation will make the PVC rebind:

"annotations": {
   "pv.kubernetes.io/bind-completed": "yes"

I copied the PVC from another PVC and forget to remove the annotation.

Thanks for contributing an answer to Stack Overflow!

  • Please be sure to answer the question. Provide details and share your research!

But avoid

  • Asking for help, clarification, or responding to other answers.
  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers.