Failed to mount the network path: No such file or directory
lw8008 opened this issue · comments
I'm following the guide to test mount CIFS in k8s pod. but got below error:
~> kubectl describe po busybox
Name: busybox
Namespace: default
Priority: 0
Node: sc25k8s2002/10.237.8.22
Start Time: Thu, 17 Dec 2020 09:35:52 +0000
Labels:
Annotations: kubectl.kubernetes.io/last-applied-configuration:
{"apiVersion":"v1","kind":"Pod","metadata":{"annotations":{},"name":"busybox","namespace":"default"},"spec":{"containers":[{"command":["sl...
Status: Pending
IP:
IPs:
Containers:
busybox:
Container ID:
Image: busybox
Image ID:
Port:
Host Port:
Command:
sleep
3600
State: Waiting
Reason: ContainerCreating
Ready: False
Restart Count: 0
Environment:
Mounts:
/tmp from test (rw)
/var/run/secrets/kubernetes.io/serviceaccount from default-token-hpzrn (ro)
Conditions:
Type Status
Initialized True
Ready False
ContainersReady False
PodScheduled True
Volumes:
test:
Type: FlexVolume (a generic volume resource that is provisioned/attached using an exec based plugin)
Driver: fstab/cifs
FSType: cifs
SecretRef: &LocalObjectReference{Name:cifs-secret,}
ReadOnly: false
Options: map[mountOptions:vers=2.1,dir_mode=0755,file_mode=0644,noperm networkPath://172.31.193.29/share_50983137_0abc_4d57_91ca_04c7c7c1207f]
default-token-hpzrn:
Type: Secret (a volume populated by a Secret)
SecretName: default-token-hpzrn
Optional: false
QoS Class: BestEffort
Node-Selectors:
Tolerations: node.kubernetes.io/not-ready:NoExecute for 300s
node.kubernetes.io/unreachable:NoExecute for 300s
Events:
Type Reason Age From Message
Normal Scheduled default-scheduler Successfully assigned default/busybox to k8s2002
Warning FailedMount 11s (x5 over 21s) kubelet, k8s2002 MountVolume.SetUp failed for volume "test" : mount command failed, status: Failure, reason: cifs mount: failed to mount the network path: mount error(13): Permission denied
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)
Warning FailedMount 1s kubelet, k8s2002 MountVolume.SetUp failed for volume "test" : mount command failed, status: Failure, reason: cifs mount: failed to mount the network path: mount error(2): No such file or directory
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)
I can use "mount -t" to mount the CIFS in K8s nodes.
Does it due to dir "test' not created in /pods//volumes/fstab~cifs/ for some reason?