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.2capacity)- 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 ...
随机推荐
- 解迷宫的C++的未完善编程代码........请大神们帮忙改善下.........
这...................................................................... 我也是醉了 看不太懂,大神们求解............ ...
- 您可能不曾注意的C++内置类型选择和使用的注意事项
写在前面: 太忙了,好久没有写博客.这篇文章是在下读C++ Primer中文第五版(与以往版本相比,第五版的一大特色就是“为新的C++11标准重新撰写”——引自封皮)时的笔记,没有什么技术含量,只是作 ...
- vmware
vSphere Client 图形用户界面提供了执行许多配置任务的首选方式.但是,如有必要,可以使用 ESXi Shell 在命令行处配置 ESXi .esxcli network firewall ...
- [HIHO1393]网络流三·二分图多重匹配
题目链接:http://hihocoder.com/problemset/problem/1393 把项目到汇点的边权值都加起来,跑完最大流后看是否最大流=权值和.如果等于权值和说明所有项目都有足够的 ...
- background-sizi (转)
http://www.cnblogs.com/greenteaone/archive/2012/08/28/2659878.html (原创作者链接地址 ) Background-Size:[ & ...
- Java 集合 - HashSet
一.源码解析 public class HashSet<E> extends AbstractSet<E> implements Set<E>, Cloneable ...
- lucene 分词实现
一.概念认识 1.常用的Analyer SimpleAnalyzer.StopAnalyzer.WhitespaceAnalyzer.StandardAnalyzer 2.TokenStream 分词 ...
- Git命令行(转用于学习和记录)
Git命令行介绍和使用说明(持续更新) 参见:<Git 中文简体教程> 一. 命令“git”或者“git help”查询常用命令 [add]: “git add”——不但是用来添加不在版本 ...
- Spring-cloud & Netflix 源码解析:Eureka 服务注册发现接口 ****
http://www.idouba.net/spring-cloud-source-eureka-client-api/?utm_source=tuicool&utm_medium=refer ...
- 金融IC卡 ARQC和ARPC计算方法和实例(转)
假设发卡行的IC卡应用密钥如下: PBOC_IMK_AC F0C34A8124CEE0A91A0B034AA97D6EAC PBOC_IMK_ENC ...