这个原因是你的容器使用了太多的临时文件了
错也也有
1 |
The node was low on resource: ephemeral-storage. |
1 2 3 4 5 6 7 |
- name: wp image: wordpress resources: requests: ephemeral-storage: "2Gi" limits: ephemeral-storage: "4Gi" |
解决方案如上,就是设置上磁盘的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
Latest posts by Zhiming Zhang (see all)
- aws eks node 自动化扩展工具 Karpenter - 8月 10, 2022
- ReplicationController and ReplicaSet in Kubernetes - 12月 20, 2021
- public key fingerprint - 5月 27, 2021