k8s pv
PersistentVolume
object from Kubernetes as well as deletes associated storage asset in external infrastructure such as AWS EBS, GCE PD or Cinder volume.)。 如果有合适的volume插件支持,那么会对volume循环的执行一个基本的擦除命令(rm -rf /tenvoluem/*)来使得他对新的claim变得可用。- GCEPersistentDisk
- AWSElasticBlockStore
- AzureFile
- FC (Fibre Channel)
- NFS
- iSCSI
- RBD (Ceph Block Device)
- CephFS
- Cinder (OpenStack block storage)
- Glusterfs
- VsphereVolume
- HostPath (single node testing only – local storage is not supported in any way and WILL NOT WORK in a multi-node cluster)
apiVersion: v1
kind: PersistentVolume
metadata:
name: pv0003
spec:
capacity:
storage: 5Gi
accessModes:
- ReadWriteOnce
persistentVolumeReclaimPolicy: Recycle
nfs:
path: /tmp
server: 172.17.0.2
capacity
)- ReadWriteOnce – the volume can be mounted as read-write by a single node
- ReadOnlyMany – the volume can be mounted read-only by many nodes
- ReadWriteMany – the volume can be mounted as read-write by many nodes
- RWO - ReadWriteOnce
- ROX - ReadOnlyMany
- RWX - ReadWriteMany
Volume Plugin | ReadWriteOnce | ReadOnlyMany | ReadWriteMany |
---|---|---|---|
AWSElasticBlockStore | x | - | - |
AzureFile | x | x | x |
CephFS | x | x | x |
Cinder | x | - | - |
FC | x | x | - |
FlexVolume | x | x | - |
GCEPersistentDisk | x | x | - |
Glusterfs | x | x | x |
HostPath | x | - | - |
iSCSI | x | x | - |
NFS | x | x | x |
RDB | x | x | - |
VsphereVolume | x | - | - |
- Retain – manual reclamation 手工回收
- Recycle – basic scrub (“rm -rf /thevolume/*”) 基础擦除
- Delete – associated storage asset such as AWS EBS, GCE PD or OpenStack Cinder volume is deleted
- Avaliable - 一个空闲的资源,还没有和claim绑定
- Bound - volume已经和claim绑定
- Released - 对应的claim已经被删除。但是资源没有被集群回收
- Failed --这个volume自动回收失败
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 8Gi
selector:
matchLabels:
release: "stable"
matchExpressions:
- matchLabels - volume必须有一个这个样值的label
- matchExpressions - values和operator把列出的key和操作符关联起来( a list of requirements made by specifying key, list of values, and operator that relates the key and values),有效的操作符包括In, NotIn,Esxists和DoesNotExist
matchLabels
and matchExpressions
are ANDed together – they must all be satisfied in order to match)PersistentVolume
backing the claim.)kind: Pod
apiVersion: v1
metadata:
name: mypod
spec:
containers:
- name: myfrontend
image: dockerfile/nginx
volumeMounts:
- mountPath: "/var/www/html"
name: mypd
volumes:
- name: mypd
persistentVolumeClaim:
ROX
, RWX
) is only possible within one namespace.)k8s pv的更多相关文章
- k8s pv,pvc无法删除问题
一般删除步骤为:先删pod再删pvc最后删pv 但是遇到pv始终处于“Terminating”状态,而且delete不掉.如下图: 解决方法: 直接删除k8s中的记录: 1 kubectl patch ...
- k8s pv无法删除问题
一般删除步骤为:先删pod再删pvc最后删pv 但是遇到pv始终处于“Terminating”状态,而且delete不掉.如下图: 解决方法: 直接删除k8s中的记录: kubectl patch p ...
- 【k8s】k8s pv、pvc无法删除问题。
一般删除步骤为:先删除pod再删除pvc最后删除pv 遇到的问题 但是遇到pv使用处于"Terminating"状态,而且删不掉.如下图: 解决办法 直接删除k8s中的记录: ku ...
- K8s PV and PVC and StorageClass
PVC和PV之间没有依靠ID.名称或者label匹配,而是靠容量和访问模式,PVC的容量和访问模式需要是某个PV的子集才能自动匹配上.注意:PVC和PV是一对一的,也即一个PV被一个PVC自动匹配后, ...
- k8s pv 的三种挂载模式
ReadWriteOnce:可读可写,只能被一个Node节点挂载 ReadWriteMany:可读可写,可以被多个Node节点挂载 ReadOnlyMany:只读,能被多个Node节点挂载
- K8S 使用NFS 创建PV和PVC的例子 学习From https://blog.csdn.net/xts_huangxin/article/details/51494472
1. 获取资料 网址: https://blog.csdn.net/xts_huangxin/article/details/51494472 感谢原作者 这里面 按照自己的机器情况进行了学习模仿 ...
- 从零开始入门 K8s | 应用存储和持久化数据卷:存储快照与拓扑调度
作者 | 至天 阿里巴巴高级研发工程师 一.基本知识 存储快照产生背景 在使用存储时,为了提高数据操作的容错性,我们通常有需要对线上数据进行 snapshot ,以及能快速 restore 的能力.另 ...
- k8s使用Glusterfs动态生成pv
一.环境介绍 [root@k8s-m ~]# cat /etc/hosts127.0.0.1 localhost localhost.localdomain localhost4 localhost4 ...
- k8s的持久化存储PV&&PVC
1.PV和PVC的引入 Volume 提供了非常好的数据持久化方案,不过在可管理性上还有不足. 拿前面 AWS EBS 的例子来说,要使用 Volume,Pod 必须事先知道如下信息: 当前 Volu ...
随机推荐
- blue and red ball
#include<iostream> #include<cstring> using namespace std; int sum; ]; int n; int head; i ...
- <转>好婚姻是彼此放心
-01- 临下班,马丽听到隔壁桌的方雅在打电话,声音听起来嗲声嗲气:“有个朋友晚上约我吃饭,要晚点回来,你不用等我了哦.” 电话挂断时,已经到了下班的点.方雅扭头对马丽说:“丽姐,待会我们一起去吃个饭 ...
- Vi指令,随时追加
1.设置tab键的空格数 :set tabstop=4 2.显示行号 :set nu
- IE7中绝对定位元素之间的遮盖问题
由于页面复杂就不上现实例子,举例说明. 两个同层级<div>元素,都设置了 position: relative;相对定位. 他们的内部的元素(不管什么元素了)都设置了position: ...
- 去繁从简--简化Message和Signal设置
以往的版本中如果添加了消息或者信号类型的事件需要先在流程属性(设置流程ID的界面)中添加Message和Signal,之后再选择对应的事件在属性中的下拉框中选择已经定义的Message或Signal. ...
- Scope 安装和使用
Scope 安装和使用 一.安装 1. 软件下载 https://sourceforge.net/projects/cscope/files/ 2. 解压 3. 安装 ./configure --pr ...
- zsh下 home end 键失效的解决办法
我的环境是 centos 6.5 x64 安装 oh my zsh 后,home end 键失效,解决办法为在 .zshrc 里添加设置如下 #Rebind HOME and END to do th ...
- JAV07接口与继承之动手动脑问题解决
动手动脑:请自行编写代码测试以下特性:在子类中,若要调用父类中被覆盖的方法,可以使用super关键字. 1.源代码: package Work; class A{ public A(){ System ...
- android自动获取短信验证码
前言:android应用的自动化测试必然会涉及到注册登录功能,而许多的注册登录或修改密码功能常常需要输入短信验证码,因此有必要能够自动获得下发的短信验证码.主要就是实时获取短信信息.android上获 ...
- F4搜索帮助 带回多个值
昨天群里有人问,就自己试了一下,POV执行在走PAI之前,所以空表行的时候TABLE里是没有数据的,所以一开始想用MIDOFY的想法看来不完善,可以再空表时做个APPEND. 后来又换了个想法,直 ...