我们有一个 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。
关于kubernetes - 在 kubernetes 中调试 NoDiskConflict,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37621495/