2017-08-30 41 views
1

我有一個基於GKE的Kubernetes設置和需要存儲卷的POD。我嘗試使用以下配置:Kubernetes - PersistentVolumeClaim失敗

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也不能解決問題。誰能幫忙?謝謝。

回答

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 
+0

較小1TB PVC工作確定,我選擇了SSD類型以及:)謝謝 –

相關問題