In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
It is believed that many inexperienced people have no idea about how to analyze StorageClass and dynamic volume supply in Kubernetes. Therefore, this paper summarizes the causes and solutions of the problem. Through this article, I hope you can solve this problem.
Storage is an important part of the container running environment, and Kubernetes provides some basic capabilities for storage management. Dynamic volume provisioning is a unique feature of Kubernetes that allows storage volumes to be created on demand. Before this capability is lacking, cluster administrators need to call their cloud or storage provider to create new storage volumes, and then create PersistentVolume objects after success before they can be used in Kubernetes. Dynamic volume provisioning capability allows administrators not to create storage volumes in advance, but to create them according to user needs.
New features
Alpha version of dynamic volumes, a cluster can only allow separate, hard-coded providers at the same time. That is, if Kubernetes is going to provide dynamic volumes, even if multiple storage systems can be used in the cluster, Kubernetes will only use the same storage volume plug-in. The selection of storage providers is based on the type of cloud environment-- AWS's EBS,Google Cloud's Persistent Disk or OpenStack's Cinder, and vSphere's vSphere Volume. In addition, only capacity parameters can be configured. This means that even if other parameters are available, all dynamic volumes are the same except for the size.
Although the Alpha version of this feature is of limited usefulness, it is a step forward and will help determine the direction of future development.
A new API object StorageClass is added in Kubernetes 1.4, which can define multiple StorageClass objects, specify storage plug-ins and set parameters to provide different storage volumes. This design allows cluster administrators to define and provide different types of volumes with different parameters (the same or different storage systems) within the same cluster. This design also ensures that end users have the ability to choose different storage options without knowing much.
Administrator configuration
The cluster administrator defines and publishes two StorageClass objects
Kind: StorageClassapiVersion: storage.k8s.io/v1beta1metadata: name: slowprovisioner: kubernetes.io/gce-pdparameters: type: pd-standard
This section creates a StorageClass called "slow" to provide standard persistent storage.
Kind: StorageClassapiVersion: storage.k8s.io/v1beta1metadata: name: fastprovisioner: kubernetes.io/gce-pdparameters: type: pd-ssd
This section creates a StorageClass called "fast" to provide persistent storage similar to SSD.
User request
The user can include a StorageClass application in the PersistentVolumeClaim to provide dynamic storage. This task needs to be done using volume.beta.kubernetes.io/storage-class annotations. The value of this annotation must match the StorageClass name configured by the administrator.
To select the "fast" storage class, the user needs to create the following PVC:
{"kind": "PersistentVolumeClaim", "apiVersion": "v1", "metadata": {"name": "claim1", "annotations": {"volume.beta.kubernetes.io/storage-class": "fast"}}, "spec": {"accessModes": ["ReadWriteOnce"] "resources": {"requests": {"storage": "30Gi"}
The above message will provide a persistent disk equivalent to SSD, and when the PVC is deleted, the volume will be destroyed.
Default behavior
All PVC can use some dynamic storage directly without using StorageClass annotations. Just mark a StorageClass object as "default". StorageClass can become the default storage with annotated storageclass.beta.kubernetes.io/is-default-class.
With the default StorageClass, users do not need storage-class annotations to create PVC, and the new DefaultStorageClass admission controller in 1.4 automatically points this annotation to the default storage class.
Can I still use the Alpha version?
Kubernetes 1.4 is compatible with the dynamic volume feature of the alpha version, allowing users to make a smooth transition to the beta version. Use volume.alpha.kubernetes.io/storage-class annotations to mark the alpha version.
Standard Cloud support
If the Kubernetes cluster is deployed in a cloud service provider, we consider automatically using the cloud's local storage system to create a dynamic volume provider. For example, a standard deployment on AWS will result in a dynamic volume provider for EBS, while a deployment of Google Cloud will provide a dynamic volume provider for GCE PD. We are still discussing whether this volume should be used as the default volume.
After reading the above, have you mastered how to parse StorageClass and dynamic volume provisioning in Kubernetes? If you want to learn more skills or want to know more about it, you are welcome to follow the industry information channel, thank you for reading!
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.