本文介绍了简单来说,持久性交易量(PV)和持久性交易量声明(PVC)有什么区别?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在Kubernetes/Openshift中,通过参考文档,持久卷(PV)和持久卷声明(PVC)有什么区别?

What is the difference between persistent volume (PV) and persistent volume claim (PVC) in Kubernetes/ Openshift by referring to documentation?

简单地说,两者有什么区别?

What is the difference between both in simple terms?

推荐答案

PVC 是对存储需求的声明,可以在某个时候变得可用/满足-就像绑定到某些实际的 PV .

PVC is a declaration of need for storage that can at some point become available / satisfied - as in bound to some actual PV.

这有点像 承诺 的异步编程概念强>. PVC承诺它将在某个时候转换"为您的应用程序将能够使用的存储卷,并定义为类别,大小和访问模式(ROX,RWO和RWX)之一.

It is a bit like the asynchronous programming concept of a promise. PVC promises that it will at some point "translate" into storage volume that your application will be able to use, and one of defined characteristics like class, size, and access mode (ROX, RWO, and RWX).

这是一种从吊舱/部署中抽象出对特定存储实现的思考的方法.在大多数情况下,您的应用程序不需要声明从大小为X的服务器X给我NFS存储";它更像是我需要持久存储默认类和大小Y".

This is a way to abstract thinking about a particular storage implementation away from your pods/deployments. Your application in most cases does not need to declare "give me NFS storage from server X of size Y"; it is more like "I need persistent storage of default class and size Y".

这样,不同集群上的部署可以选择不同地满足该需求.一个可以链接EBS设备,另一个可以提供GlusterFS,并且两种情况下您的核心清单仍然相同.

With this, deployments on different clusters can choose to differently satisfy that need. One can link an EBS device, another can provision a GlusterFS, and your core manifests are still the same in both cases.

此外,您可以在部署中定义批量声明模板,以便每个Pod都能自动创建一个反映PVC(例如,为一组需要各自专用存储的可扩展Pod支持与基础结构无关的存储定义).

Furthermore, you can have Volume Claim Templates defined in your deployment, so that each pod gets a reflecting PVC created automatically (i.e., supporting infrastructure-agnostic storage definition for a group of scalable pods where each needs its own dedicated storage).

这篇关于简单来说,持久性交易量(PV)和持久性交易量声明(PVC)有什么区别?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-13 01:04