title: How to mount a volume with a windows container in kubernetes?
body: <p>i'm trying to mount a persistent volume into my windows container, but i alwys get this error:</p>
  
  <pre>Unable to mount volumes for pod "mssql-with-pv-deployment-3263067711-xw3mx_default(....)": timeout expired waiting for volumes to attach/mount for pod "default"/"mssql-with-pv-deployment-3263067711-xw3mx". list of unattached/unmounted volumes=[blobdisk01]</pre>
  
  <p>i've created a <a href="https://gist.github.com/lftkv/f716d453b8c1a043fac7e8a52b8d6451" rel="nofollow noreferrer">github gist</a> with the console output of "get events" and "describe sc | pvc | po" maybe someone will find the solution with it. </p>
  
  <p>Below are my scripts that I'm using for deployment.
  <br/><br/>
  my storageclass:</p>
  
  <pre>
  kind: StorageClass
  apiVersion: storage.k8s.io/v1
  metadata:
    name: azure-disk-sc
  provisioner: kubernetes.io/azure-disk
  parameters:
    skuname: Standard_LRS
  </pre>
  
  <p>my PersistentVolumeClaim:</p>
  
  <pre>
  apiVersion: v1
  kind: PersistentVolumeClaim
  metadata:
    name: azure-disk-pvc
  spec:
    storageClassName: azure-disk-sc
    accessModes:
    - ReadWriteOnce
    resources:
      requests:
        storage: 20Gi
  </pre>
  
  <p>and the deployment of my container:</p>
  
  <pre>
  apiVersion: apps/v1beta1
  kind: Deployment
  metadata:
    name: mssql-with-pv-deployment
  spec:
    replicas: 1
    template:
      metadata:
        labels:
          app: mssql-with-pv
      spec:
        nodeSelector:
          beta.kubernetes.io/os: windows
        terminationGracePeriodSeconds: 10
        containers:
        - name: mssql-with-pv
          image: testacr.azurecr.io/sql/mssql-server-windows-developer
          ports:
          - containerPort: 1433
          env:
          - name: ACCEPT_EULA
            value: "Y"
          - name: SA_PASSWORD
            valueFrom:
              secretKeyRef:
                name: mssql
                key: SA_PASSWORD
          volumeMounts:
          - mountPath: "c:/volume"
            name: blobdisk01
        volumes:
        - name: blobdisk01
          persistentVolumeClaim:
            claimName: azure-disk-pvc
  ---
  apiVersion: v1
  kind: Service
  metadata:
    name: mssql-with-pv-deployment
  spec:
    selector:
      app: mssql-with-pv
    ports:
      - protocol: TCP
        port: 1433
        targetPort: 1433
    type: LoadBalancer
  </pre>
  
  <p>what am i doing wrong? is there another way to mount a volume?</p>
  
  <p>thank for every help :)</p>