19.06.2021 Views

148422597X Kubernetes Management Design Patterns [Vohra 2017-01-29] {E559F6BB}

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Using an awsElasticBlockStore Volume

Chapter 6 ■ Using Volumes

Next, we will use the EBS volume in a ReplicationController specification file. Create a file called

pod-aws.yaml:

sudo vi pod-aws.yaml

Specify the awsElasticBlockStore volume with the volumes key with the format of the volumeID set to

aws://zone/volumeid. Obtain the volumeID from the EC2 console as shown in Figure 6-9.

Figure 6-9. Obtaining the volumeID

Specify the fsType as ext4 and the volume name as aws-volume:

volumes:

-

awsElasticBlockStore:

fsType: ext4

volumeID: "aws://us-east-1c/vol-62a59dc8"

name: aws-volume

141

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!