【问题标题】:Why is my persistent disk failing to mount to my pod?为什么我的永久性磁盘无法挂载到我的 pod?
【发布时间】:2019-06-06 09:23:42
【问题描述】:

我一直在试图找出为什么我的 pod 无法启动,当我去描述它时,我得到了这个:

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

这是我的 pod 清单:

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

我不太确定 'MountVolume.MountDevice failed for volume "nfspvc" : executable file not found in $PATH' 是什么意思,或者我还应该查看什么来调查问题的根源?

如果有什么不同,这是由脚本创建的,其顺序为:

  1. 创建计算磁盘
  2. 运行 helm,进而创建上述部署、服务、持久卷和持久卷声明。

【问题讨论】:

    标签: kubernetes google-compute-engine google-kubernetes-engine


    【解决方案1】:

    fsType: ext4i

    尝试删除那个 'i'。

    【讨论】:

      猜你喜欢
      • 2016-02-20
      • 1970-01-01
      • 2018-03-06
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2016-11-15
      • 2019-01-26
      • 1970-01-01
      相关资源
      最近更新 更多