我有一个基于GKE的Kubernetes设置和一个需要存储空间的POD。我尝试使用下面的配置:
kind: PersistentVolumeClaim
apiVersion: v1
metadata:
name: my-scratch-space
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 2000Gi
storageClassName: standard
未配置此PVC。我收到以下错误:
Failed to provision volume with StorageClass "standard": googleapi: Error 503: The zone 'projects/p01/zones/europe-west2-b' does not have enough resources available to fulfill the request. Try a different zone, or try again later.
查看GKE配额页面,我没有看到任何问题。删除其他PVC也无法解决问题。有人可以帮忙吗?感谢。
答案 0 :(得分:1)
您身边没有配置问题 - europe-west2-b
区域实际上没有足够的资源来创建2T永久磁盘。尝试使用较小的音量或使用不同的区域。
文档中有example for GCE。创建一个新的StorageClass,指定europe-west1-b
区域(实际上比europe-west2-b
便宜),如下所示:
kind: StorageClass
apiVersion: storage.k8s.io/v1
metadata:
name: gce-pd-europe-west1-b
provisioner: kubernetes.io/gce-pd
parameters:
type: pd-standard
zones: europe-west1-b
修改你的PVC:
kind: PersistentVolumeClaim
apiVersion: v1
metadata:
name: my-scratch-space
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 2000Gi
storageClassName: gce-pd-europe-west1-b