Kubernetes AWS EBS超时等待卷状态 [英] Kubernetes AWS EBS Timeout waiting for volume state

查看:97
本文介绍了Kubernetes AWS EBS超时等待卷状态的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如果我创建此广告连播:

If I create this pod:

apiVersion: v1
kind: Pod
metadata:
name: dsm-manager
spec:
containers:
- name: dsm-manager
image: ******
imagePullPolicy: Always
command:
- /sbin/init
volumeMounts:
- mountPath: /srv/project/DSMManager/snapshots
name: dsm-snapshot-storage
volumes:
- name: dsm-snapshot-storage
awsElasticBlockStore:
volumeID: aws://us-west-2b/vol-43e44482
fsType: ext4
imagePullSecrets:
- name: dockerregistrykey

它始终有效,但是如果我删除它并重新创建它,它的状态将变为"CreatingContainer".查看事件产生的结果:
-无法为Pod"dsm-manager_default"挂载卷:等待卷状态的超时
-错误同步Pod,跳过:超时等待音量状态

It always works, but if I delete it and re-create it it gets stuck with status 'CreatingContainer'. Looking in the events yields:
-Unable to mount volumes for pod "dsm-manager_default": Timeout waiting for volume state
-Error syncing pod, skipping: Timeout waiting for volume state

如果删除吊舱并重新创建吊舱,无论我做什么,都会发生相同的事情.但是,如果我将卷附加到某个实例,然后通过aws cli分离它,则创建它可以找到的容器.我想知道卷是否没有正确分离.现在,我只有一个奇怪的工作流程:将卷附加到随机实例,然后在更新容器映像时将其分离

If I delete the pod and re-create it the same thing happens no matter what I do. However if I attach the volume to some instance and then detach it through the aws cli, then create the pod it works find. I'm wondering if the volume isn't being detached properly. For now I just have this odd work flow of attaching the volume to a random instance then detaching it while updating the container image

推荐答案

这很可能是由Kubernetes EBS管理代码中的错误引起的,应该由

This is likely caused by a bug in the Kubernetes EBS management code, and should be fixed by PR #14493. To summarize, not validating the device block cache was causing the kubelet to think the disk was still attached after it had actually been detached.

这篇关于Kubernetes AWS EBS超时等待卷状态的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆