You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

GKE无法为Deployment/Pod挂载卷:等待条件超时问题求助

问题详情

我们遇到了和两年前某Stack Overflow帖子完全一致的问题。自2018年起稳定运行的工作负载,在更新证书后突然无法启动。故障根源是:Pod通过NFS挂载持久盘时,基于gcr.io/google_containers/volume-nfs:0.8镜像的nfs-server Pod无法挂载该持久盘。

我们已完成以下操作,但问题仍未解决:

  • 将GKE集群从1.23版本升级至1.25.5-gke.2000(期间尝试过多个中间版本),同步切换至containerd运行时
  • 多次调整配置并重建相关资源,但所有Pod均无法访问持久盘

已排查的基础配置项:

  • 持久盘与GKE集群处于同一区域
  • Pod使用的服务账号具备访问磁盘的必要权限

额外异常:尽管日志配置正常,但所有Pod均无日志输出

nfs-server.yaml配置内容

apiVersion: apps/v1
kind: Deployment
metadata:
  creationTimestamp: null
  labels:
    role: nfs-server
  name: nfs-server
spec:
  replicas: 1
  selector:
    matchLabels:
      role: nfs-server
  strategy:
    rollingUpdate:
      maxSurge: 1
      maxUnavailable: 1
    type: RollingUpdate
  template:
    metadata:
      labels:
        role: nfs-server
    spec:
      containers:
      - image: gcr.io/google_containers/volume-nfs:0.8
        imagePullPolicy: IfNotPresent
        name: nfs-server
        ports:
        - containerPort: 2049
          name: nfs
          protocol: TCP
        - containerPort: 20048
          name: mountd
          protocol: TCP
        - containerPort: 111
          name: rpcbind
          protocol: TCP
        resources: {}
        securityContext:
          privileged: true
        terminationMessagePath: /dev/termination-log
        terminationMessagePolicy: File
        volumeMounts:
        - mountPath: /exports
          name: webapp-disk
      dnsPolicy: ClusterFirst
      restartPolicy: Always
      schedulerName: default-scheduler
      securityContext: {}
      terminationGracePeriodSeconds: 30
      volumes:
      - gcePersistentDisk:
          fsType: ext4
          pdName: webapp-data-disk
        name: webapp-disk
status: {}

内容的提问来源于stack exchange,提问作者Jim G

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.08.02 00:01:14