O'Reilly logo

Kubernetes Cookbook, 2nd Edition by Ke-Jou Carol Hsu, Hui-Chuan Chloe Lee, Hideto Saito

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

awsElasticBlockStore

awsElasticBlockStore volume mounts an Amazon Web Service Elastic Block Store (AWS EBS) volume. It's a service that provides persistent block storage for Amazon EC2. Just like the GCE persistent disk, we can provision it statically or dynamically.

To provision it statically, administrators have to create an EBS volume by the AWS console or AWS CLI beforehand. The following is an example of how to mount an existing EBS volume to the containers in a Deployment:

// example of how we used pre-created EBS volume.# cat 2-6-8_aws/static_mount.yamlkind: DeploymentapiVersion: apps/v1metadata:  name: aws-ebs-deploymentspec:  replicas: 2  selector:    matchLabels:      run: nginx  template:    metadata:      labels:        run: nginx    spec:      volumes: - name: ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required