:_mod-docs-content-type: ASSEMBLY
[id="persistent-storage-aws"]
= Persistent storage using AWS Elastic Block Store
include::_attributes/common-attributes.adoc[]
:context: persistent-storage-aws

toc::[]

[role="_abstract"]
ifdef::openshift-rosa,openshift-rosa-hcp,openshift-dedicated[]
{product-title} clusters are prebuilt with two storage classes that use Amazon Elastic Block Store (Amazon EBS) volumes. These storage classes are ready to use and some familiarity with Kubernetes and AWS is assumed.

The following are the two prebuilt storage classes:
[options="header"]

|===

| Name | Provisioner

| gp2-csi | ebs.csi.aws.com

| gp3-csi (default) | ebs.csi.aws.com

|===
The gp3-csi storage class is set as default; however, you can select any of the storage classes as the default storage class.
endif::openshift-rosa,openshift-rosa-hcp,openshift-dedicated[]

ifndef::openshift-rosa,openshift-rosa-hcp,openshift-dedicated[]
{product-title} supports Amazon Elastic Block Store (EBS) volumes.
You can provision your {product-title} cluster with persistent storage by using Amazon EC2.
endif::openshift-rosa,openshift-rosa-hcp,openshift-dedicated[]

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.
You can dynamically provision Amazon EBS volumes.
Persistent volumes are not bound to a single project or namespace; they can be shared across the {product-title} cluster.
Persistent volume claims are specific to a project or namespace and can be requested by users.
You can define a KMS key to encrypt container-persistent volumes on AWS.
By default, newly created clusters by using {product-title} version 4.10 and later use gp3 storage and the AWS EBS CSI driver.

[IMPORTANT]
====
High-availability of storage in the infrastructure is left to the underlying storage provider.
====

ifndef::openshift-rosa,openshift-rosa-hcp,openshift-dedicated[]
[IMPORTANT]
====
{product-title} 4.12 and later provides automatic migration for the AWS Block in-tree volume plugin to its equivalent CSI driver.

CSI automatic migration should be seamless. Migration does not change how you use all existing API objects, such as persistent volumes, persistent volume claims, and storage classes. For more information about migration, see CSI automatic migration.
====
endif::openshift-rosa,openshift-rosa-hcp,openshift-dedicated[]

// Defining attributes required by the next module
:StorageClass: EBS
:Provisioner: kubernetes.io/aws-ebs
:CsiDriver: ebs.csi.aws.com

include::modules/storage-create-storage-class.adoc[leveloffset=+1]

include::modules/storage-persistent-storage-creating-volume-claim.adoc[leveloffset=+1]

:provider: AWS
include::modules/storage-persistent-storage-volume-format.adoc[leveloffset=+1]

include::modules/storage-persistent-storage-aws-maximum-volumes.adoc[leveloffset=+1]

include::modules/storage-persistent-storage-volume-encrypt-with-kms-key.adoc[leveloffset=+1]

[id="additional-resources_persistent-storage-aws"]
[role="_additional-resources"]
== Additional resources

* link:https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/concepts.html[Amazon EC2 documentation]
* link:https://github.com/openshift/aws-ebs-csi-driver[AWS EBS CSI driver]
ifndef::openshift-rosa,openshift-rosa-hcp,openshift-dedicated[]
* xref:../../storage/container_storage_interface/persistent-storage-csi-migration.adoc#persistent-storage-csi-migration[CSI automatic migration]
endif::openshift-rosa,openshift-rosa-hcp,openshift-dedicated[]
* xref:../../storage/container_storage_interface/persistent-storage-csi-ebs.adoc#persistent-storage-csi-ebs[AWS Elastic Block Store CSI Driver Operator]
