Editor’s note: this post is part of a series of in-depth articles on what's new in Kubernetes 1.6 Show
Storage is a critical part of running stateful containers, and Kubernetes offers powerful primitives for managing it. Dynamic volume provisioning, a feature unique to Kubernetes, allows storage volumes to be created on-demand. Before dynamic provisioning, cluster administrators had to manually make calls to their cloud or storage provider to provision new storage volumes, and then create PersistentVolume objects to represent them in Kubernetes. With dynamic provisioning, these two steps are automated, eliminating the need for cluster administrators to pre-provision storage. Instead, the storage resources can be dynamically provisioned using the provisioner specified by the StorageClass object (see user-guide). StorageClasses are essentially blueprints that abstract away the underlying storage provider, as well as other parameters, like disk-type (e.g.; solid-state vs standard disks). StorageClasses use provisioners that are specific to the storage platform or cloud provider to give Kubernetes access to the physical media being used. Several storage provisioners are provided in-tree (see user-guide), but additionally out-of-tree provisioners are now supported (see kubernetes-incubator). In the Kubernetes 1.6 release, dynamic provisioning has been promoted to stable (having entered beta in 1.4). This is a big step forward in completing the Kubernetes storage automation vision, allowing cluster administrators to control how resources are provisioned and giving users the ability to focus more on their application. With all of these benefits, there are a few important user-facing changes (discussed below) that are important to understand before using Kubernetes 1.6. Storage Classes and How to Use them StorageClasses are the foundation of dynamic provisioning, allowing cluster administrators to define abstractions for the underlying storage platform. Users simply refer to a StorageClass by name in the PersistentVolumeClaim (PVC) using the “storageClassName” parameter. In the following example, a PVC refers to a specific storage class named “gold”.
In order to promote the usage of dynamic provisioning this feature permits the cluster administrator to specify a default StorageClass. When present, the user can create a PVC without having specifying a storageClassName, further reducing the user’s responsibility to be aware of the underlying storage provider. When using default StorageClasses, there are some operational subtleties to be aware of when creating PersistentVolumeClaims (PVCs). This is particularly important if you already have existing PersistentVolumes (PVs) that you want to re-use:
The following table provides more detail on default storage classes pre-installed by cloud provider as well as the specific parameters used by these defaults.
While these pre-installed default storage classes are chosen to be “reasonable” for most storage users, this guide provides instructions on how to specify your own default. Dynamically Provisioned Volumes and the Reclaim Policy All PVs have a reclaim policy associated with them that dictates what happens to a PV once it becomes released from a claim (see user-guide). Since the goal of dynamic provisioning is to completely automate the lifecycle of storage resources, the default reclaim policy for dynamically provisioned volumes is “delete”. This means that when a PersistentVolumeClaim (PVC) is released, the dynamically provisioned volume is de-provisioned (deleted) on the storage provider and the data is likely irretrievable. If this is not the desired behavior, the user must change the reclaim policy on the corresponding PersistentVolume (PV) object after the volume is provisioned. How do I change the reclaim policy on a dynamically provisioned volume? You can change the reclaim policy by editing the PV object and changing the “persistentVolumeReclaimPolicy” field to the desired value. For more information on various reclaim policies see user-guide. FAQs How do I use a default StorageClass? If your cluster has a default StorageClass that meets your needs, then all you need to do is create a PersistentVolumeClaim (PVC) and the default provisioner will take care of the rest – there is no need to specify the storageClassName:
Can I add my own storage
classes?
How do I check if I have a default StorageClass Installed? You can use kubectl to check for StorageClass objects. In the example below there are two storage classes: “gold” and “standard”. The “gold” class is user-defined, and the “standard” class is installed by Kubernetes and is the default.
Can I delete/turn off the default StorageClasses? You can, however, disable the defaulting behavior by removing (or setting to false) the following annotation: storageclass.beta.kubernetes.io/is-default-class. If there are no StorageClass objects marked with the default annotation, then PersistentVolumeClaim objects (without a StorageClass specified) will not trigger dynamic provisioning. They will, instead, fall back to the legacy behavior of binding to an available PersistentVolume object. Can I assign my existing PVs to a particular StorageClass? What happens if I delete a
PersistentVolumeClaim (PVC)? --Saad Ali & Michelle Au, Software Engineers, and Matthew De Lio, Product Manager, Google
How is dynamic provisioning beneficial in cloud computing?Dynamic Provisioning is a volume management feature that allows storage managers and system administrators to efficiently plan and allocate storage to users or applications. It provides a platform for the array to dynamically manage data and physical capacity without frequent manual involvement.
What is the features of cloud computing where dynamic provisioning of data helps in avoiding various bottleneck scenarios?Scalability—dynamic provisioning of data helps in avoiding various bottleneck scenarios. Maintenance—users (companies/organization) have less work in terms of resource upgrades and management, which in the new paradigm will be handled by service providers of cloud computing.
What is dynamic resource provisioning in cloud computing?With dynamic provisioning, cloud resources are deployed flexibly to match a customer's fluctuating demands. Cloud deployments typically scale up to accommodate spikes in usage and scale down when demands decrease. The customer is billed on a pay-per-use basis.
What are the benefits of cloud computing enables the rapid provisioning of resources?Benefits of cloud computing. Reduced IT costs. Moving to cloud computing may reduce the cost of managing and maintaining your IT systems. ... . Scalability. ... . Business continuity. ... . Collaboration efficiency. ... . Flexibility of work practices. ... . Access to automatic updates. ... . Also consider.... |