- Kubernetes 1.13+ (CSI 1.0).
- The aws-ebs-csi-driver installed.
This example shows you how to create and consume a dynamically-provisioned EBS volume as a raw block device.
-
Deploy the provided pod on your cluster along with the
StorageClass
andPersistentVolumeClaim
:$ kubectl apply -f manifests pod/app created persistentvolumeclaim/block-claim created storageclass.storage.k8s.io/ebs-sc created
-
Validate the
PersistentVolumeClaim
is bound to yourPersistentVolume
.$ kubectl get pvc block-claim NAME STATUS VOLUME CAPACITY ACCESS MODES STORAGECLASS AGE block-claim Bound pvc-2074bf0a-4726-44f2-bb7a-eb4292d4f40a 10Gi RWO ebs-sc
-
Cleanup resources:
$ kubectl delete -f manifests pod "app" deleted persistentvolumeclaim "block-claim" deleted storageclass.storage.k8s.io "ebs-sc" deleted