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 ...
随机推荐
- MySQL导入SQL文件及常用命令
在MySQL Qurey Brower中直接导入*.sql脚本,是不能一次执行多条sql命令的,在mysql中执行sql文件的命令: mysql> source d:/myprogr ...
- Eclipse 启动出现错误 no java virtual machine was found
出现此问题的原因是eclipse找不到javaw.exe的path,打开eclipse.ini文件: -startup plugins/org.eclipse.equinox.launcher_1.3 ...
- sublimetext3备份
http://files.cnblogs.com/files/hwd13/Data.zip http://files.cnblogs.com/files/hwd13/sublime3.zip
- Linux系统下安装Mysql
原文档地址:http://www.itpub.net/thread-1766546-1-1.html 1.在Linux服务器上通过wget命令取得rpm包: wget –c http://dev.my ...
- Nginx+Tomcat发布时不间断服务的提供
原理 1.使用Nginx反向代理事项负载均衡,至少两个Tomcat(tomcatA+TomcatB)同时提供服务. 2.发布时配置Nginx的nginx.conf,只让其中的TomcatA临时提供所有 ...
- 用SignalR实现的共享画板例子
使用HTML5的canvas画布功能,在页面进行绘画,然后通过SignalR将画布的每个点的颜色提交到服务端,服务端同时将这些画布的信息推送到其他客户端,实现共享同一个画板的功能 类似下图,在某一个浏 ...
- [转] - Configuring Android Studio: IDE & VM Options, JDK, etc
Configuring Android Studio: IDE & VM Options, JDK, etc You should not edit any files in the IDE ...
- org.dbunit.database.ambiguoustablenameexception
对于一个数据库下面多个shema的情况,如果使用DBUNIT配置会出现,上面的错误,不清楚的表名,解决如下 增加红色的shema指定 参考:http://stackoverflow.com/quest ...
- Git和.gitignore
http://blog.csdn.net/cscmaker/article/details/8553980 在git中如果想忽略掉某个文件,不让这个文件提交到版本库中,可以使用修改根目录中 .giti ...
- maven工程使用spring-boot-devtools进行热部署,更改代码避免重启web容器
spring-boot-devtools 是一个为开发者服务的一个模块,其中最重要的功能就是自动应用代码更改到最新的App上面去.相关Blog: 点击打开链接 原理是在发现代码有更改之后,重新启动应用 ...