Application Development

Persistent Local Storage

By default, storage for a deployment exists within the container as ephemeral storage. For some applications, such as caches, persistent local storage may be important for optimizing application use.

Local Storage Provisioning on SLATE

Local storage space is currently being provisioned by the Kubernetes nfs-provisioner mounted to the filesystem of one node within a cluster. This allows the storage to be dynamically provisioned and cleaned up with deployments in a user-friendly way.

Kubernetes v1.12 will include a local-provisioner as an alpha feature. This is likely the direction that SLATE will take in the future. This change will likely only affect the storageClassName for developers utilizing the local storage system.

Creating a Persistent Volume Claim

In order to claim persistent local storage, a user must create a persistent volume claim (pvc) and mount it as a volume within their application.

Including a Node Affinity

In order for an application to utilize persistent local storage, it must exist on the same node in the cluster as the persistent local storage was provisioned. In order to guarantee this property, we use a NodeSelector in the deployment which schedules the application on the same node as the provisioner.

This material is based upon work supported by the National Science Foundation under Grant No. 1724821.Any opinions, findings, and conclusions or recommendations expressed in this material are those of the author(s) and do not necessarily reflect the views of the National Science Foundation.