Kubernetes continues to add enhancements to improve its support for applications utilizing storage to save state. This is a quick “aerial view” of the storage related changes in the 1.6 release.

Flex Volume enhancement

The Flex volume interface for implementing “out of tree” volume plugins has lagged behind in support for some of the latest features available to “in tree” plugins like dynamic provisioning, and centralized attach/detach controller support. In 1.6 it has been updated to make up some of this ground. Specifically, the attach/detach, and mount/unmount interface has been altered to allow more versatile management of attachment of external storage to nodes, with a provision for passing options on attach and mount. This change broke backward compatibility. As a result, Flex drivers need to be updated to implement the new interface. The changes required are relatively straight forward, so you can expect actively maintained Flex plugins to, such as the FlexRex plugin, be updated shortly after the Kubernetes 1.6 release. Shout out to Chakri Nelluri of Diamanti, and the rest of the Kubernetes open source developers for work on this one. This is classified as an Alpha feature (by definition, are still in development, and are not required to be upgradeable)

Volume Mount Options

This feature enables a Kubernetes admin to specify mount options with mountable volumes such as nfs and AWS EBS. Mount options are specified as an annotation in the PersistentVolume object. This is a Beta feature (available and generally agreed to solve the desired solution, but may need stabilization or additional feedback).

Example:

apiVersion: "v1"
kind: "PersistentVolume"
metadata:
  name: gce-disk-1
  annotations:
  volume.beta.kubernetes.io/mount-options: "discard"
spec:
  capacity:
    storage: "10Gi"
  accessModes:
    - "ReadWriteOnce"
  gcePersistentDisk:
    fsType: "ext4"
    pdName: "gce-disk-1

Configurable Dynamic Provisioning

This was formerly designated as Beta, and in 1.6 moves to stable. The functionality remains the same but formerly a PersistentVolume used a `volume.beta.kubernetes.io/storage-class` annotation to specify storage class. Now the attribute `storageClassName` should be used to specify a storage class. For the 1.6 release, both the annotation and the attribute will work, but in the future, 1.8 at the earliest, support for the annotation will be removed.

Default storage Classes for Cloud Providers

For selected cloud providers, PersisentVolumes that omit a storageClassName are dynamically provisioned using a configurable default class of storage.

This is pre-installed and set as default on Azure, AWS, GCE, OpenStack, and vSphere and is something to pay close attention to if you’ve been using Kubernetes for a while This changes the default behavior of PersistentVolumeClaim objects on these clouds.

Marking a StorageClass as `default`  will override a PersistentVolumeClaim without a StorageClass specified and will trigger dynamic provisioning (instead of binding to an existing pool of PVs).

External Provisioners

Kubernetes has built in support for dynamic provisioning (aka.automated volume allocation and creation). The 1.6 release enables supplementing or replacing the built in provisioner with a custom written, “out of tree” volume provisioner.

This is done by implementing a provisioner that complies with the specification defined here:

https://github.com/kubernetes/community/blob/master/contributors/design-proposals/volume-provisioning.md

Storage classes have a provisioner specification and can also specify provisioner dependent parameters.

Customized mounts in chroot

This feature will not pertain to most users. Google Container Engine (aka GKE) uses a Container-Optimized OS that does not carry certain storage drivers and tools needed for mounts from storage providers such as nfs. Mount activity is accomplished by having mount code execute inside a container using a shared mount with the host in combination with code using a chroot approach.

New Dell EMC ScaleIO Plugin

Dell EMC ScaleIO is supported as a storage provider for Kubernetes. ScaleIO is a great combination to consider when deploying Kubernetes on premises. Vladimir Vivien’s blog published last week, covers the details on this.

New Portworx Plugin

Portworx is supported as a storage provider for Kubernetes.

These new features prove that Google and Kubernetes are committed to making stateful services more stable and robust. The {code} team is keeping in lockstep to make sure FlexRex and the DellEMC ScaleIO Plugin are able to take advantage of all the latest additions. Give FlexRex or the Dell EMC ScaleIO Plugin with Kubernetes a spin at the {code} Labs.