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 ...
随机推荐
- shmop ftok
http://blog.csdn.net/heiworld/article/details/25426723 对于ftok的理解 http://www.jb51.net/article/510 ...
- kali/centos 更新 java
kali 转自:http://blog.sina.com.cn/s/blog_5736d8870102w15u.html 墙内的论坛上和博客上有很多这样的文章了,不过一般过程都很复杂,让人看的头晕眼花 ...
- java回调初步学习
转帖请注明本文出自xiaanming的博客(http://blog.csdn.net/xiaanming/article/details/17483273),请尊重他人的辛勤劳动成果,谢谢以前不理解什 ...
- 我的Markdown笔记
一片简单的Markdown笔记,共8项,基本上满足Markdown文档的编写(表格不建议用Markdown),每项上半部分是源码,下半部分是效果图片. 标题 段落 列表 强调 分割线 代码 连接 图片 ...
- Grunt_1从安装开始创建一个基本的Grunt
Grunt的介绍:http://www.gruntjs.net/getting-started 文件架构:https://github.com/zhangsai521314/Grunt 1:安装Git ...
- cocos2dx解决苹果正版ipv6的问题
苹果官方出了新的规定,要求新上架的app都必须单独支持ipv6-only的网络. 具体的要求链接:https://developer.apple.com/library/mac/documentati ...
- SublimeText2 快捷键一览表
SublimeText2 快捷键一览表 Sublime Text比起Notepad++,UltraEdit之类Code编辑器来说,其功能有过之而无不及,配合着各种插件使用,Sublime Text在实 ...
- java文章显示内容部分(将html转成纯文本)
public static String splitAndFilterString(String input, int length) { if (input == null || input.tri ...
- Android热修复之微信Tinker使用初探
文章地址:Android热修复之微信Tinker使用初探 前几天,万众期待的微信团队的Android热修复框架tinker终于在GitHub上开源了. 地址:https://github.com/ ...
- STM32命名原则
每种STM32的产品都由16个字母或数字构成的编号标示,用户向ST订货时必须使用这个编号指定需要的产品.这16个字符分为8个部分,下面通过一个例子说明它们的意义: STM32 F 103 C ...