flexVolume无法挂载SMB驱动器

时间:2019-12-12 21:18:12

标签: docker kubernetes

我正在尝试使用flexVolumes将带有PV / PVC的SMB驱动器安装在kubernetes集群中。提交工作时出现以下错误。

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

集群是由Rancher创建的包括Windows节点和Linux节点的本地集群。可以通过命令行正常安装Samba驱动器。

我不确定如何解决此问题。

0 个答案:

没有答案