当前位置:网站首页>Kubernetes----PV和PVC的生命周期简介
Kubernetes----PV和PVC的生命周期简介
2022-07-26 12:35:00 【51CTO】
一、PV和PVC生命周期简介
PV和PVC的生命周期见下图

PV和PVC是一一对应的,PV和PVC之间的相互作用遵循一下生命周期:
资源供应
管理员手动创建底层存储和PV
资源绑定
用户创建PVC,Kubernetes负责根据PVC声明去寻找PV,并绑定
在用户定义好PVC之后,系统将根据PVC对存储资源的请求在已存在的PV中选择一个满足条件的
- 一旦找到,就将该PV与用户定义的PVC进行绑定,用户的应用就可以使用这个PC了
- 如果找不到,PVC则会无限期处于Pending状态,知道等到系统管理员创建了一个符合其要求的PV
PV一旦绑定到某个PVC上,就会被这个PVC独占,不能再与其他PVC进行绑定了
资源使用
用户可以在Pod中像volume一样使用PVC
Pod使用Volume的定义,将PVC挂载到容器内的某个路径进行使用
资源释放
用户删除PVC来释放PV
当存储资源使用完毕后,用户可以删除PVC,与该PVC绑定的PV将会被标记为“已释放”,但还不能立刻与其他的PVC进行绑定,通过之前PVC写入的数据可能还被留在存储设备上,只有在清除之后该PV才能再次使用
资源回收
Kubernetes根据PV设置的回收策略进行资源的回收
对于PV,管理员可以设定回收策略,用于设置与之绑定的PVC释放资源之后如何处理遗留数据的问题,只有PV的存储空间完成回收,才能供新的PVC绑定和使用
边栏推荐
猜你喜欢

How much do you know about the two infrastructures of the badminton stadium?

How do children's playgrounds operate?

Code error reporting and problem solving experience II: test error reporting in yolov5

笔记。。。。

什么是物联网?常见IoT协议最全讲解

Dry goods semantic web, Web3.0, Web3, metauniverse, these concepts are still confused? (medium)

How RFID works

Use the jsonobject object in fastjason to simplify post request parameter passing

Knowledge points of C language documents

Vs code set the method of ctrl+s saving and automatic formatting
随机推荐
Can the Windows version of Oracle be used in Linux?
PXE principle and configuration
敲黑板画重点:七种常见“分布式事务”详解
“2022华为开发者大赛中国区东部赛区开幕式”在福州成功举办
可移动表空间
二、容器_
LCD笔记(7)LCD驱动程序框架_配置时钟
美容院管理系统统一管理制度?
Database composition view
数据库组成存储过程和函数
14.2字节流学习
QT入门引导 及其 案例讲解
JDBC gets connections from the connection pool (Druid connection pool)
Azure Synapse Analytics 性能优化指南(2)——使用具体化视图优化性能(上)
Hit the blackboard and draw the key points: a detailed explanation of seven common "distributed transactions"
.eslintrc.js配置说明
Digital intelligence transformation, management first | jnpf strives to build a "full life cycle management" platform
HCIP-9.OSPF的各种拓展
How much do you know about the two infrastructures of the badminton stadium?
【2243】module_param.m