如何解决在使用面向头盔的错误部署应用程序后,pvc附带了未绑定的立即PersistentVolumeClaims
我正在尝试使用头盔在k8s集群上部署示例postgres。部署应用程序后,我运行了kubectl get pods,然后由于该错误“ pod具有未绑定的即时PersistentVolumeClaims”,我的应用程序处于待处理状态。
Please check the logs:
Name: postgres-7b448c59b9-5zbpd
Namespace: default
Priority: 0
Node: <none>
Labels: app=postgres
group=db
pod-template-hash=7b448c59b9
Annotations: <none>
Status: Pending
IP:
IPs: <none>
Controlled By: ReplicaSet/postgres-7b448c59b9
Containers:
postgres:
Image: postgres:9.6-alpine
Port: 5432/TCP
Host Port: 0/TCP
Environment Variables from:
postgres-config ConfigMap Optional: false
Environment: <none>
Mounts:
/var/lib/postgresql/data from postgres-storage (rw)
/var/run/secrets/kubernetes.io/serviceaccount from default-token-9v2fd (ro)
Conditions:
Type Status
PodScheduled False
Volumes:
postgres-storage:
Type: PersistentVolumeClaim (a reference to a PersistentVolumeClaim in the same namespace)
ClaimName: postgres-persistent-volume-claim
ReadOnly: false
default-token-9v2fd:
Type: Secret (a volume populated by a Secret)
SecretName: default-token-9v2fd
Optional: false
QoS Class: BestEffort
Node-Selectors: <none>
Tolerations: node.kubernetes.io/not-ready:NoExecute op=Exists for 300s
node.kubernetes.io/unreachable:NoExecute op=Exists for 300s
Events:
Type Reason Age From Message
---- ------ ---- ---- -------
Warning FailedScheduling 58s (x2 over 58s) default-scheduler 0/2 nodes are available: 2 pod has unbound immediate PersistentVolumeClaims.
解决方法
这意味着您的Pod请求的PVC存储空间超出了实际数量。确保您将PVC正确分配给豆荚。
您可以检查PVC
kubectl get pvc
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。