我有一个基于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也不能解决问题。有人可以帮忙吗?谢谢。
最佳答案
您身边没有配置问题-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