kubernetes - 在 kubernetes 中调试 NoDiskConflict

标签 kubernetes

我们有一个 pod 运行了大约一个月,但突然之间无法再安排了。描述 pod 似乎表明磁盘已满或不可用,但它不是很具体(请参阅下面描述 pod 的完整输出)。

我已确认此节点上的磁盘有足够的空间(95G),并且它引用的 GCEPersistentDisk 也有足够的空间(450G)。我还能寻找什么来让它再次工作?

到目前为止,我已经尝试重新启动节点,甚至删除节点以从头开始。这是 GKE 上的单节点集群。

感谢任何提示!

> kubectl --namespace=bakery-production describe pods bakery-deployment-3841321805-l84nc
Name:       bakery-deployment-3841321805-l84nc
Namespace:  bakery-production
Node:       /
Labels:     pod-template-hash=3841321805,service=bakery
Status:     Pending
IP:     
Controllers:    ReplicaSet/bakery-deployment-3841321805
Containers:
  bakery:
    Image:  gcr.io/pear-deck-production/bakery:38fda09f727493e4e88def14d49fe36883414e08
    Port:   80/TCP
    QoS Tier:
      cpu:  BestEffort
      memory:   BestEffort
    Environment Variables:
      PEARDECK_CONTAINER_REGISTRY:  gcr.io/pear-deck-production
Volumes:
  docker-images:
    Type:   GCEPersistentDisk (a Persistent Disk resource in Google Compute Engine)
    PDName: bakery-docker-images
    FSType: ext4
    Partition:  0
    ReadOnly:   false
  bakery-secret-volume:
    Type:   Secret (a volume populated by a Secret)
    SecretName: bakery-secret
  default-token-z3ew1:
    Type:   Secret (a volume populated by a Secret)
    SecretName: default-token-z3ew1
Events:
  FirstSeen LastSeen    Count   From            SubobjectPath   Type        Reason          Message
  --------- --------    -----   ----            -------------   --------    ------          -------
  20s       13s     4   {default-scheduler }            Warning     FailedScheduling    pod (bakery-deployment-3841321805-l84nc) failed to fit in any node
fit failure on node (gke-peardeck-infrastructure-0f42f748-node-qa5a): NoDiskConflict

最佳答案

NoDiskConflict 如果您尝试安排引用卷的 pod 已被另一个(已安排的)pod 引用并且该卷不支持多个装载,则调度程序将返回 NoDiskConflict。 GCE PD 仅在它们都是只读的情况下才允许多个挂载。

因此,请确保只有一个 pod 以读写模式引用 GCE PD。

参见 https://github.com/kubernetes/kubernetes/blob/master/plugin/pkg/scheduler/algorithm/predicates/predicates.go#L105

关于kubernetes - 在 kubernetes 中调试 NoDiskConflict,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37621495/

相关文章:

kubernetes - 是否可以将 redis 模块(redisbloom)加载到 redis helm 图表(bitnami/redis 或 bitnami/redis-cluster)上?

azure - 由于政策原因,AKS 无法修改入口创建时的 AGIC

java - Spring Boot无法连接到部署在另一个kubernetes pod上的postgres数据库

amazon-web-services - 竞价型实例 “frequency of interruption”比例按计划获取

go - istio 多集群间流量管理

kubernetes - 如何在 GKE 上提供对 Kubeflow 的访问?

基于 JVM 堆内存的 Kubernetes HPA

Kubernetes 证书总是在几个小时后消失

logging - 如何收集Kubernetes CronJob一段时间内每个作业的日志?

bash - 运行 kubectl exec 时禁用 Kubernetes 上的网络日志