k8s提供多种volume接口,其中local 和host path是容易混淆的两个接口。下面这篇文章解释了两者的区别:

https://groups.google.com/forum/#!topic/kubernetes-users/68Yvm8ZkztI

关键内容:
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 scheduler will need to create a new pod, and this pod might be scheduled to node C which doesn't have the data. Oops!

Local volumes fix this by ensuring a pod is scheduled to the machine where the data exists.

k8s local volume 和host path volume的区别的更多相关文章

  1. K8S学习笔记之Pod的Volume emptyDir和hostPath

    0x00 Volume的类型 Volume是Kubernetes Pod中多个容器访问的共享目录. Volume被定义在Pod上,被这个Pod里的多个容器挂在到相同或不同的路径下. Volume的生命 ...

  2. 理解OpenShift(5):从 Docker Volume 到 OpenShift Persistent Volume

    理解OpenShift(1):网络之 Router 和 Route 理解OpenShift(2):网络之 DNS(域名服务) 理解OpenShift(3):网络之 SDN 理解OpenShift(4) ...

  3. Dockerfile Volume指令与docker -v的区别

    在学习Dockerfile的过程中有个VOLUME命令,很多教程或书中说的是用来定义匿名卷的,其作用如下: 容器运行时应该尽量保持容器存储层不发生写操作,对于数据库类需要保存动态数据的应用,其数据库文 ...

  4. Python join() 方法与os.path.join()的区别

    Python join() 方法与os.path.join()的区别 pythonJoinos.path.join 今天工作中用到python的join方法,有点分不太清楚join() 方法与os.p ...

  5. 【Selenium + Python】之如何获取最新的报告以及os.path.getmtime与os.path.getctime的区别

    import os def new_file(test_dir): #列举test_dir目录下的所有文件(名),结果以列表形式返回. lists=os.listdir(test_dir) #sort ...

  6. Nodejs中,path.join()和path.resolve()的区别

    在说path.join()和path.resolve()的区别之前,我先说下文件路径/和./和../之间的区别 /代表的是根目录: ./代表的是当前目录: ../代表的是父级目录. 然后再来说下pat ...

  7. k8s实战之数据卷(volume)

    一.概述 数据卷用于实现容器持久化数据,k8s对于数据卷重新定义,提供了丰富强大的功能:数据卷分为三类: 本地数据卷,网络数据卷和信息数据卷 二.

  8. Can't initialize physical volume "/dev/sdb" of volume group "cinder-volumes" without -ff /dev/sdb: physical volume not initialized.

    原因:无法初始化物理量,之前创建的cinder-volumes没有卸载 方法一: [root@storage cinder]# lsblk NAME MAJ:MIN RM SIZE RO TYPE M ...

  9. path与classpath区别(转)

    转自http://blog.csdn.net/mydreamongo/article/details/8155408 1.path的作用 path是系统用来指定可执行文件的完整路径,即使不在path中 ...

随机推荐

  1. windows下如何打开.sketch的文件

    1 .sketch的文件只能在苹果mac上支持的一种文件格式,现在越来越多的设计师喜欢用.sketch 2 windows下如果想打开.sketch文件,去Microsoft store 找一个Lun ...

  2. python+Appium自动化:toast定位

    Toast简介 Toast是一种简易的消息提示框. 当视图显示给用户,在应用程序中显示为浮动.和Dialog不一样的是,它永远不会获得焦点,无法被点击. 用户将可能是在中间键入别的东西.Toast类的 ...

  3. Verilog从文件读数据

    reg start;reg [17:0] counter;always @(posedge i_clk)//置rst.startbegin //产生读数据地址 if(counter==171519|| ...

  4. JSONOjbect,对各种属性的处理

    import com.alibaba.fastjson.JSONObject; public class JsonTest { public static void main(String[] arg ...

  5. 【线性代数】2-3:消元与矩阵的关系(Elimination and Matrix)

    title: [线性代数]2-3:消元与矩阵的关系(Elimination and Matrix) toc: true categories: Mathematic Linear Algebra da ...

  6. CUDA-F-5-5-常量内存

    title: [CUDA 基础]5.5 常量内存 categories: - CUDA - Freshman tags: - CUDA常量内存 - CUDA只读缓存 toc: true date: 2 ...

  7. Python基础之enumerate枚举

    枚举,对于一个可迭代的(iterable)/可遍历的对象(如列表,字符串),enumerate将其组成一个索引序列,利用它可以同时获得索引和值. 1. 第一种类型 lst = ["a&quo ...

  8. PHP面向对象学习-属性 类常量 类的自动加载 构造函数和析构函数 访问控制(可见性)

    在类的成员方法里面,可以用 ->(对象运算符):$this->property(其中 property 是该属性名)这种方式来访问非静态属性.静态属性则是用 ::(双冒号):self::$ ...

  9. How to do Deep Learning on Graphs with Graph Convolutional Networks

    翻译: How to do Deep Learning on Graphs with Graph Convolutional Networks 什么是图卷积网络 图卷积网络是一个在图上进行操作的神经网 ...

  10. tensorflow feeddict问题unhashable type: 'numpy.ndarray'

    https://stackoverflow.com/a/49134587 求argmax.加newaxis.转变data类型时尽量用tf自带的函数: tf.argmax.[tf.newaxis, :] ...