In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly explains "what is the PVC of Kubernetes". The content of the explanation is simple and clear, and it is easy to learn and understand. Please follow the editor's train of thought to study and learn "what is the PVC of Kubernetes".
PVC is used for the declaration of PV.
Life cycle
Pending: waiting status, not yet bound to PV
Bound: binding status, already bound to PV
Lost: lost status, lost binding relationship with PV
Parameter accessModes (access mode)
This field, PVC, is the same as PV. You can also set the access mode and describe the access permissions of the application to the storage resources.
VolumeMode (Storage Volume Mode)
This field, PVC is the same as PV, describes the PV storage volume mode you want to use, which can be configured as file system and block devices.
Resources (Resource request)
This field is used to describe requests for storage resources. Currently, you can only set requests.storage, that is, the setting of storage space.
StorageClassName (name of the bound StorageClass, that is, storage category)
This field is used to set the backend storage category (that is, bind StorageClass) to reduce dependence on backend storage feature details. There are two situations:
If you set this field to a StorageClass, only PV with the same Class set will be selected and bound to PVC.
If you set this field to empty storageClassName= "", you will not set Class. This depends on whether the system enables the admission controller named DefaultStorageClass:
DefaultStorageClass is not started: PV with no Class set will be selected for matching and binding.
Enable DefaultStorageClass: the administrator defines the default StorageClass, and the system creates a PV using the back-end storage of the default StorageClass and automatically binds to the PVC. The specific way to set this is to add an annotation "storageclass.kubernetes.io/is-default-class=true" to the definition of StorageClass. It is important to note that only one default StorageClass can be defined.
Selector (selection criteria)
This field can filter all kinds of PV that already exist in the system, and select the most suitable PV to bind according to the filter conditions. There are two fields below:
MatchLabels:PV must have this tag value
MatchExpressions: specifies the tag selector list through key-value pairs and operators, including: In, Notln, Exists, and DoesNotExist
If both fields are set, all the conditions must be met to complete the match.
Finally, it is important to note that Pod, PV, and PVC must all work in the same namespace.
In addition, if dynamic storage management is used, that is, the PV is not defined in advance, but only handed over to the system through StorageClass to automatically complete the dynamic creation of PV, then the selector set by PVC is invalid. If the user deletes the PVC, the PV bound to it (the default recycling policy is Delete) will also be deleted. You can manually change the Delete policy to Retain after the binding is successful.
Thank you for your reading, the above is the content of "what is the PVC of Kubernetes". After the study of this article, I believe you have a deeper understanding of what the PVC of Kubernetes is, and the specific use needs to be verified in practice. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.