OKD supports AWS Elastic Block Store volumes (EBS). You can provision your OKD cluster with persistent storage using AWS EC2. Some familiarity with Kubernetes and AWS is assumed.

The Kubernetes persistent volume framework allows administrators to provision a cluster with persistent storage and gives users a way to request those resources without having any knowledge of the underlying infrastructure. AWS Elastic Block Store volumes can be provisioned dynamically. Persistent volumes are not bound to a single project or namespace; they can be shared across the OKD cluster. Persistent volume claims are specific to a project or namespace and can be requested by users.

High-availability of storage in the infrastructure is left to the underlying storage provider.

Installing the AWS Elastic Block Store CSI Driver Operator

The AWS Elastic Block Store (EBS) Container Storage Interface (CSI) Driver Operator enables the replacement of the existing AWS EBS in-tree storage plug-in.

AWS EBS CSI Driver Operator is a Technology Preview feature only. Technology Preview features are not supported with Red Hat production service level agreements (SLAs) and might not be functionally complete. Red Hat does not recommend using them in production.

Installing the AWS EBS CSI Driver Operator provides the CSI driver that allows you to use CSI volumes with the PersistentVolumeClaims, PersistentVolumes, and StorageClasses API objects in OKD. It also deploys the StorageClass that you can use to create persistent volume claims (PVCs).

The AWS EBS CSI Driver Operator is not installed in OKD by default. Use the following procedure to install and configure this Operator to enable the AWS EBS CSI driver in your cluster.

  • Access to the OKD web console.


To install the AWS EBS CSI Driver Operator from the web console:

  1. Log in to the web console.

  2. Navigate to OperatorsOperatorHub.

  3. To locate the AWS EBS CSI Driver Operator, type AWS EBS CSI into the filter box.

  4. Click Install.

  5. On the Install Operator page, be sure that All namespaces on the cluster (default) is selected. Select openshift-aws-ebs-csi-driver-operator from the Installed Namespace drop-down menu.

  6. Adjust the values for Update Channel and Approval Strategy to the values that you want.

  7. Click Install.

Once finished, the AWS EBS CSI Driver Operator is listed in the Installed Operators section of the web console.

Creating the EBS Storage Class

StorageClasses are used to differentiate and delineate storage levels and usages. By defining a storage class, users can obtain dynamically provisioned persistent volumes.

  1. In the OKD console, click StorageStorage Classes.

  2. In the storage class overview, click Create Storage Class.

  3. Define the desired options on the page that appears.

    1. Enter a name to reference the storage class.

    2. Enter an optional description.

    3. Select the reclaim policy.

    4. Select kubernetes.io/aws-ebs from the drop down list.

    5. Enter additional parameters for the storage class as desired.

  4. Click Create to create the storage class.

Creating the Persistent Volume Claim


Storage must exist in the underlying infrastructure before it can be mounted as a volume in OKD.

  1. In the OKD console, click StoragePersistent Volume Claims.

  2. In the persistent volume claims overview, click Create Persistent Volume Claim.

  3. Define the desired options on the page that appears.

    1. Select the storage class created previously from the drop-down menu.

    2. Enter a unique name for the storage claim.

    3. Select the access mode. This determines the read and write access for the created storage claim.

    4. Define the size of the storage claim.

  4. Click Create to create the persistent volume claim and generate a persistent volume.

Volume format

Before OKD mounts the volume and passes it to a container, it checks that it contains a file system as specified by the fsType parameter in the persistent volume definition. If the device is not formatted with the file system, all data from the device is erased and the device is automatically formatted with the given file system.

This allows using unformatted AWS volumes as persistent volumes, because OKD formats them before the first use.

Maximum Number of EBS Volumes on a Node

By default, OKD supports a maximum of 39 EBS volumes attached to one node. This limit is consistent with the AWS volume limits.

OKD can be configured to have a higher limit by setting the environment variable KUBE_MAX_PD_VOLS. However, AWS requires a particular naming scheme (AWS Device Naming) for attached devices, which only supports a maximum of 52 volumes. This limits the number of volumes that can be attached to a node via OKD to 52.