<p>Hello all i am trying to create a <code>StatefulSet</code> which has a PVC and StorageClass as Azurefileshare.
when i have created this my PVC is in pending state:</p>
<pre><code>Events:
  Type     Reason                Age                 From                         Message
  ----     ------                ----                ----                         -------
  Warning  ProvisioningFailed    51m                 persistentvolume-controller  Failed to provision volume with StorageClass &quot;azurefile-standard-zrs2&quot;: 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=&lt;nil&gt; Code=&quot;MaxStorageAccountsCountPerSubscriptionExceeded&quot; Message=&quot;Subscription 0c767d4cf39 already contains 251 storage accounts in location westeurope and the maximum allowed is 250.&quot;
</code></pre>
<p>This is my manifest file:</p>
<pre><code>apiVersion: apps/v1
kind: StatefulSet
metadata:
  name: nginx-deployment2
  namespace: test
spec:
  replicas: 1
  selector:
    matchLabels:
      app: backup
  serviceName: &lt;SERVICE_NAME&gt;
  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: &quot;64Mi&quot;
            cpu: &quot;50m&quot;
          limits:
            memory: &quot;100Mi&quot;
            cpu: &quot;200m&quot;
        name: nginx
        ports:
        - containerPort: 80
        volumeMounts:
        - mountPath: &quot;/var/log/nginx&quot;
          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
</code></pre>

Satyam Pandey
<p>As @<strong>mmiking</strong> pointed out in the comments section, you've reached the max number of storage accounts in a single subscription but <strong>only</strong> in the <code>westeurope</code> location.</p>
<p>You can see in the <a href="https://learn.microsoft.com/en-us/azure/machine-learning/how-to-manage-quotas#storage" rel="nofollow noreferrer">Azure resource quotas documentation</a>:</p>
<blockquote>
<p>Azure Storage has a limit of 250 storage accounts per region, per subscription. This limit includes both Standard and Premium storage accounts.</p>
</blockquote>
<p><strong>NOTE:</strong> This limit is per region per subscription. You are able to create 250 storage accounts in one region (e.g. <code>westeurope</code>) and you can still create another 250 storage accounts in a different region (e.g. <code>northeurope</code>) using the same subscription.</p>
<p>You can see your current storage account usage in a specific location using <a href="https://learn.microsoft.com/en-us/cli/azure/storage/account?view=azure-cli-latest#az_storage_account_show_usage-examples" rel="nofollow noreferrer">az storage account show-usage</a> command:</p>
<pre><code>$ az storage account show-usage --location &lt;LOCATION_NAME&gt; --out table --subscription &lt;SUBSCRIPTION_ID&gt;
CurrentValue    Limit    Unit
--------------  -------  ------
9               250      Count
</code></pre>
