问题现象:

k8s报错:pod has unbound immediate PersistentVolumeClaims (repeated 2 times)

 

查看描述信息

[root@k8s-master pv]# kubectl describe pod web-nginx-0

k8s报错:pod has unbound immediate PersistentVolumeClaims (repeated 2 times)

 

 

 

原因: STORAGECLASS 没有指定的 PV 可以绑定

1、查看资源控制器绑定的 PV 信息

发现绑定的 storageClassName 为 nfs ,访问模式为 只读(RWO)

k8s报错:pod has unbound immediate PersistentVolumeClaims (repeated 2 times)

 

 

 2、查看服务器上 PV 信息

发现 RWO 对应的模式为 slow,而我们配置文件里面需要的是 nfs 类型

k8s报错:pod has unbound immediate PersistentVolumeClaims (repeated 2 times)

 

 

 3、修改配置文件或者PV的类型,此处将 PV 的slow 改为 nfs

[root@k8s-master pv]# kubectl get pv
NAME              CAPACITY   ACCESS MODES   RECLAIM POLICY   STATUS      CLAIM                        STORAGECLASS   REASON   AGE
wangzy-nfstest    2Gi        RWO            Retain           Bound       default/wangzy-web-nginx-0   nfs                     3m3s
wangzy-nfstest1   3Gi        ROX            Retain           Available                                nfs                     51s
[root@k8s-master pv]# kubectl get pod
NAME          READY   STATUS    RESTARTS   AGE
test-path     1/1     Running   0          27h
web-nginx-0   1/1     Running   0          8s

 

k8s报错:pod has unbound immediate PersistentVolumeClaims (repeated 2 times)

 

相关文章:

  • 2021-08-22
  • 2021-11-25
  • 2021-09-04
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-09-07
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-06-14
  • 2022-12-23
  • 2021-09-11
  • 2021-10-22
  • 2021-11-10
相关资源
相似解决方案