Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- openshift version : 4.18 running locally (CRC)
- apiVersion: v1
- kind: Secret
- metadata:
- name: smbcreds
- namespace: default
- stringData:
- username: <MY_NETWORK_USER_ID>// or should this be a service account
- password: <MY_NETWORK_PASSWORD>
- apiVersion: v1
- kind: PersistentVolume
- metadata:
- annotations:
- pv.kubernetes.io/provisioned-by: smb.csi.k8s.io
- name: ngstest
- spec:
- capacity:
- storage: 30Gi
- accessModes:
- - ReadWriteMany
- persistentVolumeReclaimPolicy: Retain
- storageClassName: ""
- mountOptions:
- - dir_mode=0777
- - file_mode=0777
- csi:
- driver: smb.csi.k8s.io
- volumeHandle: smb-server.default.svc.cluster.local/share#
- volumeAttributes:
- source: <WINDOWS_SHARED_DRIVE_PATH> //this is what I want to mount inside openshift pod
- nodeStageSecretRef:
- name: smbcreds
- namespace: default
- kind: PersistentVolumeClaim
- apiVersion: v1
- metadata:
- name: ngstestpvc
- spec:
- accessModes:
- - ReadWriteMany
- resources:
- requests:
- storage: 10Gi
- storageClassName: ""
- volumeName: ngstest
- apiVersion: v1
- kind: Pod
- metadata:
- name: smb-test-pod
- labels:
- app: test-smb
- namespace: default
- spec:
- securityContext:
- runAsNonRoot: true
- seccompProfile:
- type: RuntimeDefault
- containers:
- - name: test-smb
- image: 'image-registry.openshift-image-registry.svc:5000/openshift/httpd:latest'
- command: ["sleep", "3600"]
- volumeMounts:
- - name: ngstest
- mountPath: /data
- ports:
- - containerPort: 8080
- securityContext:
- allowPrivilegeEscalation: false
- capabilities:
- drop:
- - ALL
- volumes:
- - name: ngstest1
- persistentVolumeClaim:
- claimName: ngstestpvc
- error MountVolume.MountDevice failed for volume "ngstest" : rpc error: code = Internal desc = volume(smb-server.default.svc.cluster.local/share#) mount "<MY_WINDOWS_SHARE>" on "/var/lib/kubelet/plugins/kubernetes.io/csi/smb.csi.k8s.io/d4eec83fb9158e40043cd60743bb95213019cacb12c7dd2bbac2015a69ac22b3/globalmount" failed with mount failed: exit status 32 Mounting command: mount Mounting arguments: -t cifs -o dir_mode=0777,file_mode=0777,<masked> <MY_WINDOWS_SHARE> /var/lib/kubelet/plugins/kubernetes.io/csi/smb.csi.k8s.io/d4eec83fb9158e40043cd60743bb95213019cacb12c7dd2bbac2015a69ac22b3/globalmount Output: mount error(95): Operation not supported Refer to the mount.cifs(8) manual page (e.g. man mount.cifs) and kernel log messages (dmesg)
Advertisement
Add Comment
Please, Sign In to add comment