首页 » 运维 » 正文

kubernetes The node was low on resource: ephemeral-storage.” Evicted

这个原因是你的容器使用了太多的临时文件了

错也也有

解决方案如上,就是设置上磁盘的request和limits

关于这部分临时文件,找到了网上解释如下:

Nodes have local ephemeral storage, backed by locally-attached writeable devices or, sometimes, by RAM. “Ephemeral” means that there is no long-term guarantee about durability.

Pods use ephemeral local storage for scratch space, caching, and for logs. The kubelet can provide scratch space to Pods using local ephemeral storage to mount emptyDir volumes into containers.

The kubelet also uses this kind of storage to hold node-level container logs, container images, and the writable layers of running containers.

Caution: If a node fails, the data in its ephemeral storage can be lost.
Your applications cannot expect any performance SLAs (disk IOPS for example) from local ephemeral storage.

As a beta feature, Kubernetes lets you track, reserve and limit the amount of ephemeral local storage a Pod can consume

大体意思就是说,我们创建的pod 中一些 磁盘类型如果是emptydir, 它就会使用物理主机上的磁盘空间,然后kubelet也会在临时文件中存储一部分Node级别的container日志,最上层的读写层的数据,已经正在执行的容器镜像等

我们设置好值以后,用超过Limit, kubernetes就会干掉我们的Pod

 

Zhiming Zhang

Senior devops at Appannie
一个奔跑在运维路上的胖子
Zhiming Zhang

发表评论