k8s-存储
文章平均质量分 83
weopsway
从运维的角度思考开发,从开发的角度思考运维...
展开
-
k8s基础-hostpath和localvolume(需创建sc/pv/pvc)的区别示例
引用官话的一句话:Both use local disks available on a machine. But! Imagine you have a cluster of three machines and have a Deployment with a replica of 1. If your pod is scheduled on node A, writes to a host path, then the pod is destroyed. At this point the sch原创 2022-04-07 08:14:58 · 4695 阅读 · 0 评论 -
k8s基础-empty,hostpath
Pod是生命周期是短暂,容器销毁时,保存在容器内部文件系统中的数据都会被清除。为了持久化保存容器的数据,这里引入了kubernetes Volume,k8s volume是独立于容器,pod中容器被销毁或重建,但volume会被保留。本质上k8s volume是一个目录,k8s提供了各种backend后端的抽象,用户在使用的时候不需要关心数据存放在本地节点还是cloud上,对用户来说,所有volume只是一个目录。重要概念:emptyDir(和pod同生同灭),hostPath(独立于pod),外原创 2022-04-04 21:19:55 · 2643 阅读 · 0 评论