本文主要是介绍k8s容器驱逐之ephemeral-storage,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
1.容器被驱逐,首先比较直观的是查看Event
The node was low on resource: ephemeral-storage.
Container zk was using 910316Ki, which exceeds its request of 0.
2.原因
cat /etc/docker/daemon.json
{"exec-opts": ["native.cgroupdriver=systemd"],"log-driver": "json-file","log-opts": {"max-size": "100m","max-file": "10"},"bip": "xxxxxx/24","oom-score-adjust": -1000,"registry-mirrors": ["https://xxx.mirror.aliyuncs.com"],"storage-driver": "overlay2","storage-opts":["overlay2.override_kernel_check=true"],"live-restore": true
}
k8s容器应用使用console以方便日志采集,日志尽管有清理,但是ephemeral-storage是整体概念
达到驱逐限制,则bbq
3.像zk或者Kafka中间件核心的有状态的虽然方便运维且有HA,但是存在驱逐后有一定风险。
即使单独使用打标签、打污点的专属节点,但只是缓解风险来临,因此建议优先选择非k8s环境。
这篇关于k8s容器驱逐之ephemeral-storage的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!