Guest User

openshift error

a guest
Oct 6th, 2025
129
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.53 KB | None | 0 0
  1. openshift version : 4.18 running locally (CRC)
  2.  
  3.  
  4. apiVersion: v1
  5. kind: Secret
  6. metadata:
  7. name: smbcreds
  8. namespace: default
  9. stringData:
  10. username: <MY_NETWORK_USER_ID>// or should this be a service account
  11. password: <MY_NETWORK_PASSWORD>
  12.  
  13.  
  14. apiVersion: v1
  15. kind: PersistentVolume
  16. metadata:
  17. annotations:
  18. pv.kubernetes.io/provisioned-by: smb.csi.k8s.io
  19. name: ngstest
  20. spec:
  21. capacity:
  22. storage: 30Gi
  23. accessModes:
  24. - ReadWriteMany
  25. persistentVolumeReclaimPolicy: Retain
  26. storageClassName: ""
  27. mountOptions:
  28. - dir_mode=0777
  29. - file_mode=0777
  30. csi:
  31. driver: smb.csi.k8s.io
  32. volumeHandle: smb-server.default.svc.cluster.local/share#
  33. volumeAttributes:
  34. source: <WINDOWS_SHARED_DRIVE_PATH> //this is what I want to mount inside openshift pod
  35. nodeStageSecretRef:
  36. name: smbcreds
  37. namespace: default
  38.  
  39.  
  40.  
  41. kind: PersistentVolumeClaim
  42. apiVersion: v1
  43. metadata:
  44. name: ngstestpvc
  45. spec:
  46. accessModes:
  47. - ReadWriteMany
  48. resources:
  49. requests:
  50. storage: 10Gi
  51. storageClassName: ""
  52. volumeName: ngstest
  53.  
  54.  
  55. apiVersion: v1
  56. kind: Pod
  57. metadata:
  58. name: smb-test-pod
  59. labels:
  60. app: test-smb
  61. namespace: default
  62. spec:
  63. securityContext:
  64. runAsNonRoot: true
  65. seccompProfile:
  66. type: RuntimeDefault
  67. containers:
  68. - name: test-smb
  69. image: 'image-registry.openshift-image-registry.svc:5000/openshift/httpd:latest'
  70. command: ["sleep", "3600"]
  71. volumeMounts:
  72. - name: ngstest
  73. mountPath: /data
  74. ports:
  75. - containerPort: 8080
  76. securityContext:
  77. allowPrivilegeEscalation: false
  78. capabilities:
  79. drop:
  80. - ALL
  81. volumes:
  82. - name: ngstest1
  83. persistentVolumeClaim:
  84. claimName: ngstestpvc
  85.  
  86.  
  87. 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