flexVolume fails to mount SMB drive

12/12/2019

I am trying to mount a SMB drive with a PV/PVC in a kubernetes cluster using flexVolumes. I am getting the following error when I submit jobs.

MountVolume.SetUp failed for volume "smb-job" : mount command failed, status: Failure, reason: Caught exception A specified logon session does not exist. It may already have been terminated.  with stack

pv.yaml

apiVersion: v1
kind: PersistentVolume
metadata:
  name: smb-volume
spec:
  capacity:
    storage: 100Gi
  accessModes:
    - ReadWriteMany
  flexVolume:
    driver: microsoft.com/smb.cmd
    secretRef:
      name: "smb-secret"
    options:
      source: "\\\\ip_address\\test"

pvc.yaml

apiVersion: v1
kind: PersistentVolumeClaim
metadata:
  name: smb-pv-claim
spec:
  accessModes:
    - ReadWriteMany
  resources:
    requests:
      storage: 100Gi

Cluster is a local cluster comprised of a windows node and a linux node, created with Rancher. Normal mounting of Samba drives through the command line is possible.

I am unsure of how to troubleshoot this.

-- Morgan Gladden
docker
kubernetes

0 Answers