我一直试图找出为什么我的吊舱无法启动的原因,当我描述它时,我得到了:
Events:
Type Reason Age From Message
---- ------ ---- ---- -------
Normal Scheduled 2m default-scheduler Successfully assigned my-namespace/nfs to gke-default-pool
Normal SuccessfulAttachVolume 2m attachdetach-controller AttachVolume.Attach succeeded for volume "nfspvc"
Warning FailedMount 50s kubelet, default-pool Unable to mount volumes for pod "nfs-8496cc5fd5-wjkm2_sxdb-branch161666(28ff323d-8839-11e9-a080-42010a8400bb)": timeout expired waiting for volumes to attach or mount for pod "my-namespace"/"nfs-8496cc5fd5-wjkm2". list of unmounted volumes=[nfspvc]. list of unattached volumes=[nfspvc default-token-ntmfv]
Warning FailedMount 28s (x9 over 2m) kubelet, default-pool MountVolume.MountDevice failed for volume "nfspvc" : executable file not found in $PATH
当我描述计算磁盘时,一切看起来都不错:
creationTimestamp: '2019-06-06T01:56:31.079-07:00'
id: '5701286856735681489'
kind: compute#disk
labelFingerprint: 42WmSpB8rSM=
lastAttachTimestamp: '2019-06-06T01:57:51.852-07:00'
name: nfs-pd
physicalBlockSizeBytes: '4096'
selfLink: <omitted>
sizeGb: '10'
status: READY
type: <omitted>
users:
- <omitted>
zone: <omitted>
Updates are available for some Cloud SDK components. To install them,
please run:
$ gcloud components update
这是我的豆荚清单:
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
labels:
role: nfs
name: nfs
namespace: my-namespace
spec:
replicas: 1
selector:
matchLabels:
role: nfs
spec:
containers:
- image: gcr.io/google_containers/volume-nfs:0.8
name: nfs
ports:
- containerPort: 2049
name: nfs
protocol: TCP
- containerPort: 20048
name: mountd
protocol: TCP
- containerPort: 111
name: rpcbind
protocol: TCP
volumeMounts:
- mountPath: /exports
name: nfspvc
restartPolicy: Always
volumes:
- gcePersistentDisk:
fsType: ext4i
pdName: nfs-pd
name: nfspvc
我真的不确定卷“ nfspvc”的哪个“ MountVolume.MountDevice失败:在$ PATH中找不到可执行文件”是什么意思,或者我应该考虑什么以调查问题根源?
如果有所不同,则由脚本创建,其顺序为:
答案 0 :(得分:0)
fsType:ext4i
尝试删除该“ i”。