Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't install correctly smb-flexvol #70

Open
SebastienHo opened this issue Jul 7, 2020 · 4 comments
Open

Can't install correctly smb-flexvol #70

SebastienHo opened this issue Jul 7, 2020 · 4 comments
Labels
question Further information is requested

Comments

@SebastienHo
Copy link

What happened:

I intend to install smb-flexvol using th efollowing command :

kubectl apply -f https://raw.githubusercontent.com/Azure/kubernetes-volume-drivers/master/flexvolume/smb/deployment/smb-flexvol-installer.yaml

I have 4 pods created one is in bad state :

image

Can you help me?

@andyzhangx
Copy link
Collaborator

looks like there is sth wrong with your cluster. And we suggest using https://github.com/kubernetes-csi/csi-driver-smb

@andyzhangx andyzhangx added the question Further information is requested label Jul 7, 2020
@SebastienHo
Copy link
Author

SebastienHo commented Jul 9, 2020

Thanks Andy,

Using the plugin I was able to create the PV and the PVC 👍

image

image

I am not able to use the volume within a deployment :

apiVersion: extensions/v1beta1
kind: Deployment
metadata:
  labels:
    app.kubernetes.io/name: publishing-orchestrator-job
    app.kubernetes.io/version: "{version}"
    app.kubernetes.io/component: web
    app.kubernetes.io/environment: beta
  name: publishing-orchestrator-job-deployment
  namespace: beta
spec:
  replicas: 1
  template:
    metadata:
      name: publishing-orchestrator-job
      labels:
        app: publishing-orchestrator-job
        name: publishing-orchestrator-job
    spec:
      containers:
      - name: publishing-orchestrator-job
        image: tracepartsdockerrepo.azurecr.io/moon-publishingorchestrator.job-beta:2020.3.365.2
        imagePullPolicy: "Always"
        ports:
          - containerPort: 80
            name: pod-port
        env:
        - name: ASPNETCORE_ENVIRONMENT
          value: Beta
        - name: DLL_NAME
          value: PublishingOrchestrator.job.dll
        volumeMounts:
          - name: test
            mountPath: /data
      volumes:
        - name: test
          flexVolume:
            driver: "microsoft.com/smb"
            secretRef:
              name: smbcreds
            options:
              source: "//172.16.1.43/publishingstudio$$"
              mountoptions: "vers=2.0,dir_mode=0777,file_mode=0777"   

I get the following message

MountVolume.MountDevice failed for volume "pv-smb" : rpc error: code = Internal desc = volume(publishingstudio_smb) mount "//172.16.1.43/publishingstudio$" on "/var/lib/kubelet/plugins/kubernetes.io/csi/pv/pv-smb/globalmount" failed with mount failed: exit status 32 Mounting command: mount Mounting arguments: -t cifs -o dir_mode=0777,file_mode=0777,vers=2.0,domain=172.16.1.30, //172.16.1.43/publishingstudio$ /var/lib/kubelet/plugins/kubernetes.io/csi/pv/pv-smb/globalmount Output: mount error(11): Resource temporarily unavailable Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)

Could you help me to understand what is wrong?

Regards,

Sébastien

@andyzhangx
Copy link
Collaborator

to narrow down the issue, could you ssh to one agent node, and run

mkdir /tmp/cifs
mount -t cifs -o dir_mode=0777,file_mode=0777,vers=2.0,domain=172.16.1.30, //172.16.1.43/publishingstudio ... /tmp/cifs

Looks like there is sth wrong with your smb server.

@andyzhangx
Copy link
Collaborator

also you can use this way to create a smb server on k8s cluster: https://github.com/kubernetes-csi/csi-driver-smb/tree/master/deploy/example/smb-provisioner, that may narrow down the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants