pod has unbound immediate PersistentVolumeClaims : statefulset挂载不上pv的另一种情况
问题描述:第一次安装harbor的时候没有设置trivy的storageClass,后来修改statefulset的时候报错
Error: UPGRADE FAILED: cannot patch “harbor-harbor-trivy” with kind StatefulSet: StatefulSet.apps “harbor-harbor-trivy” is invalid: spec: Forbidden: updates to statefulset spec for fields other than ‘replicas’, ‘template’, and ‘updateStrategy’ are forbidden
随后把statefulset删掉再helm upgrade harbor,trivy的pod仍然起不来,报错pod has unbound immediate PersistentVolumeClaims : statefulset
这是因为之前创建的错误的pvc没有被删掉,把pvc删掉,再重新启动pod即可。
转载:https://www.cnblogs.com/zhoushiya/p/12274465.html