【发布时间】:2021-06-08 14:41:49
【问题描述】:
大家好,我正在尝试创建一个StatefulSet,它有一个 PVC 和 StorageClass 作为 Azurefileshare。
当我创建这个时,我的 PVC 处于待处理状态:
Events:
Type Reason Age From Message
---- ------ ---- ---- -------
Warning ProvisioningFailed 51m persistentvolume-controller Failed to provision volume with StorageClass "azurefile-standard-zrs2": could not get storage key for storage account : Failed to create storage account f38f8ede8e, error: storage.AccountsClient#Create: Failure sending request: StatusCode=0 -- Original Error: autorest/azure: Service returned an error. Status=<nil> Code="MaxStorageAccountsCountPerSubscriptionExceeded" Message="Subscription 0c767d4cf39 already contains 251 storage accounts in location westeurope and the maximum allowed is 250."
这是我的清单文件:
apiVersion: apps/v1
kind: StatefulSet
metadata:
name: nginx-deployment2
namespace: test
spec:
replicas: 1
selector:
matchLabels:
app: backup
serviceName: <SERVICE_NAME>
template:
metadata:
labels:
app: backup
annotations:
backup.velero.io/backup-volumes: nginx-logs
spec:
volumes:
- name: nginx-logs1
persistentVolumeClaim:
claimName: nginx-logs1
containers:
- image: base-debian:latest
resources:
requests:
memory: "64Mi"
cpu: "50m"
limits:
memory: "100Mi"
cpu: "200m"
name: nginx
ports:
- containerPort: 80
volumeMounts:
- mountPath: "/var/log/nginx"
name: nginx-logs1
readOnly: false
---
kind: PersistentVolumeClaim
apiVersion: v1
metadata:
name: nginx-logs1
namespace: test
labels:
app: backup
spec:
accessModes:
- ReadWriteOnce
storageClassName: azurefile-standard-zrs2
resources:
requests:
storage: 1Gi
【问题讨论】:
-
你的 yaml 有问题。它不可读。
-
它在您发布的错误消息中显示:
Status= Code="MaxStorageAccountsCountPerSubscriptionExceeded" Message="Subscription 0c767d4cf39 already contains 251 storage accounts in location westeurope and the maximum allowed is 250."您已达到单个订阅中存储帐户的最大数量。
标签: kubernetes azure-storage kubernetes-pvc