0

While setting up a new cluster I removed an Azure storage account expecting the controller to re-create it, however, now when I try to use an azurefile PVC I get an error that says it can't resolve the file share address.

kind: PersistentVolumeClaim
apiVersion: v1
metadata:
  name: 'workspace-storage-j5vzpx4z'
  namespace: ide
  labels:
    component: user-storage
    userid: !f 'j5vzpx4z'
spec:
  storageClassName: azurefile
  accessModes:
    - ReadWriteMany
  resources:
    requests:
      storage: 1Gi

The pod logs show:

  Warning  FailedMount  <invalid>  kubelet, aks-nodepool1-22436891-vmss000000  MountVolume.SetUp failed for volume "pvc-3e7e8869-ecce-4fef-8440-0594f5546962" : mount failed: exit status 1
Mounting command: systemd-run
Mounting arguments: --description=Kubernetes transient mount for /var/lib/kubelet/pods/9e9828bc-622f-4bb4-bd27-8c2051876700/volumes/kubernetes.io~azure-file/pvc-3e7e8869-ecce-4fef-8440-0594f5546962 --scope -- mount -t cifs -o username=f7e7421469e4443b786ad1c,password=wl+/E9DeEClxfshVccI6FrjjAHDfWviACj0jtHyyyaIoXka6BXm3BpKsNwD/P5/zdZO94tduFN0vuvNQsxI8Lw==,file_mode=0777,dir_mode=0777,vers=3.0 //f7e7421469e4443b786ad1c.file.core.windows.net/kubernetes-dynamic-pvc-3e7e8869-ecce-4fef-8440-0594f5546962 /var/lib/kubelet/pods/9e9828bc-622f-4bb4-bd27-8c2051876700/volumes/kubernetes.io~azure-file/pvc-3e7e8869-ecce-4fef-8440-0594f5546962
Output: Running scope as unit run-r29ba9063eb1c457e993a2e740ca2e7dd.scope.
mount error: could not resolve address for f7e7421469e4443b786ad1c.file.core.windows.net: Unknown error

How can I fix this?

Ben Davis
  • 250
  • 1
  • 4
  • 16

1 Answers1

2

You'll need to delete and recreate the PVC in Kubernetes. When Kubernetes creates a file share as part of a PVC setup it assumes it owns and manages this. If you delete it outside of that scope it has no idea you have done that, or that it needs to recreate it.

Sam Cogan
  • 38,158
  • 6
  • 77
  • 113