gpt4 book ai didi

docker - Kubernetes pod的解决方案陷入终止

转载 作者:行者123 更新时间:2023-12-02 11:44:48 24 4
gpt4 key购买 nike

我是遇到上述问题的人,在执行“kubectl delete -f”后,我的容器将卡在“Terminated”上。
我无法在Docker日志中看到任何内容来帮助我缩小范围。
Docker重新启动后, pods 将消失,我可以照常继续操作,但这并不是您生活的方式。

我用Google搜索了几个小时,终于在某个地方的随机帖子中得到了一些东西。

解:
当我在Ubuntu 16.04上安装Kubernetes时,我遵循了一条指导说“install.io”。
在本文中,它表示删除“docker.io”,而是使用“docker-ce或docker-ee”安装。

BOOM,我做到了,禁用了swappoff功能,我的麻烦不再了。

我希望这对也对此有所帮助的人们有所帮助。

干杯

最佳答案

正如kleuf在评论中提到的,在他的情况下,卡住的docker容器的解决方案如下:

When i installed Kubernetes on Ubuntu 16.04 i followed a guide that said to install "docker.io". In this article it said to remove "docker.io" and rather use a "docker-ce or docker-ee" installation.


sudo apt-get remove docker docker-engine docker-ce docker.io 
sudo apt-get remove docker docker-engine docker.io -y
curl -fsSL download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo add-apt-repository "deb [arch=amd64] download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
sudo apt-get update
sudo apt-get install docker-ce -y
sudo service docker restart

BOOM, i did it, disabled the swappoff function and my troubles are no more.

I hope this helps people that are also stuck with this.

关于docker - Kubernetes pod的解决方案陷入终止,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50581744/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com