1 Introduction to Storage

Important:

The software described in this documentation is either in Extended Support or Sustaining Support. See Oracle Open Source Support Policies for more information.

We recommend that you upgrade the software described by this documentation as soon as possible.

Every meaningful workload in the computing industry requires some sort of data storage. Persistent storage is essential when working with stateful applications like databases, as it is important that you are able to retain data beyond the lifecycle of the container, or even of the pod itself.

Persistent storage in Kubernetes is handled in the form of PersistentVolume objects and are bound to pods using a PersistentVolumeClaim. You can host a PersistentVolume locally or on networked storage devices or services.

A typical Kubernetes environment involves multiple hosts and usually includes some type of networked storage. Using networked storage helps to ensure resilience and allows you to take full advantage of a clustered environment. In the case where the node where a pod is running fails, a new pod can be started on an alternate node and storage access can be resumed. This is particularly important for database environments where replica setup has been properly configured.

Persistent Storage Concepts

Persistent storage is provided in Kubernetes using the PersistentVolume subsystem. To configure persistent storage, you should be familiar with the following terms:

  • PersistentVolume

    A PersistentVolume defines the type of storage that is being used and the method used to connect to it. This is the real disk or networked storage service that is used to store data.

  • PersistentVolumeClaim

    A PersistentVolumeClaim defines the parameters that a consumer, like a pod, uses to bind the PersistentVolume. The claim may specify quota and access modes that should be applied to the resource for a consumer. A pod can use a PersistentVolumeClaim to gain access to the volume and mount it.

  • StorageClass

    A StorageClass is an object that specifies a volume plug-in, known as a provisioner, that allows users to define PersistentVolumeClaims without needing to preconfigure the storage for a PersistentVolume. This can be used to provide access to similar volume types as a pooled resource that can be dynamically provisioned for the lifecycle of a PersistentVolumeClaim.

PersistentVolumes can be provisioned either statically or dynamically.

Static PersistentVolumes are manually created and contain the details required to access real storage and can be consumed directly by any pod that has an associated PersistentVolumeClaim.

Dynamic PersistentVolumes can be automatically generated if a PersistentVolumeClaim does not match an existing static PersistentVolume and an existing StorageClass is requested in the claim. A StorageClass can be defined to host a pool of storage that can be accessed dynamically. Creating a StorageClass is an optional step that is only required if you intend to use dynamic provisioning.

The process to provision persistent storage is as follows:

  1. Create a PersistentVolume or StorageClass.

  2. Create PersistentVolumeClaims.

  3. Configure a pod to use the PersistentVolumeClaim.

The process for adding and configuring NFS and iSCSI volumes is described in detail in the upstream documentation at:

https://kubernetes.io/docs/concepts/storage/persistent-volumes/

Container Storage Interface Plug-ins

The Container Storage Interface (CSI) is an Open Container Initiative standard for controlling storage workloads from container engines. Kubernetes implements this interface to provide automated control for storage workloads inside Kubernetes clusters. For a list of the Kubernetes storage provisioners, see the upstream documentation at:

https://kubernetes.io/docs/concepts/storage/storage-classes/

You can install CSI plug-ins into a Kubernetes cluster in Oracle Cloud Native Environment. To make it easier to perform the CSI plug-in installation, Oracle provides a number of storage related modules.

The Oracle Cloud Infrastructure Cloud Controller Manager module for Oracle Cloud Native Environment can be used to set up the CSI plug-in for Oracle Cloud Infrastructure.

The Gluster Container Storage Interface module for Oracle Cloud Native Environment can be used to set up the CSI plug-in for Glusterfs.

More information on these modules is included in this guide.

Introduction to the Oracle Cloud Infrastructure Cloud Controller Manager Module

Oracle Cloud Infrastructure block volumes provide reliable, high-performance block storage designed to work with a range of virtual machines and bare metal instances. With built-in redundancy, block volumes are persistent and durable beyond the lifespan of a virtual machine and can scale to 1 PB per compute instance.

The Oracle Cloud Infrastructure Cloud Controller Manager module is used to set up dynamically provisioned persistent storage using Oracle Cloud Infrastructure block volumes. The Oracle Cloud Infrastructure Cloud Controller Manager module is deployed by the Helm module into a Kubernetes cluster.

The Oracle Cloud Infrastructure Cloud Controller Manager module creates a Kubernetes StorageClass provisioner to access storage on Oracle Cloud Infrastructure block volumes. The Kubernetes Cloud Controller Manager (oci-cloud-controller-manager) is a CSI plug-in for Kubernetes clusters running on Oracle Cloud Infrastructure. The Kubernetes Cloud Controller Manager is used to dynamically provision Oracle Cloud Infrastructure volumes for use as Kubernetes PersistentVolumes. The Platform API Server communicates with the Oracle Cloud Infrastructure API to provision and manage Oracle Cloud Infrastructure volumes using PersistentVolumeClaims. The Oracle Cloud Infrastructure volumes can be automatically destroyed when the PersistentVolumeClaims are deleted.

For more information on the Kubernetes Cloud Controller Manager, see the upstream documentation at:

https://github.com/oracle/oci-cloud-controller-manager

Introduction to the Gluster Container Storage Interface Module

Gluster is a scalable, distributed file system that aggregates disk storage resources from multiple servers into a single global namespace. Heketi is used to create and manage volumes in a Gluster cluster.

The Gluster Container Storage Interface module is used to set up dynamically provisioned persistent storage using Gluster Storage for Oracle Linux. The Gluster Container Storage Interface module is deployed by the Helm module into a Kubernetes cluster.

Oracle Cloud Native Environment does not deploy Gluster or Heketi. Gluster Storage for Oracle Linux and the Heketi API must be installed and configured separately, before it can be added to Oracle Cloud Native Environment.

The Gluster Container Storage Interface module creates a Kubernetes StorageClass provisioner to access existing storage on Glusterfs. Kubernetes uses the Glusterfs plug-in to dynamically provision Gluster volumes for use as Kubernetes PersistentVolumes. The Platform API Server communicates with the Heketi API to provision and manage Gluster volumes using PersistentVolumeClaims. The Gluster volumes can be automatically destroyed when the PersistentVolumeClaims are deleted.