19.06.2021 Views

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

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Chapter 6 ■ Using Volumes

Table 6-1. (continued)

Volume Type

awsElasticBlockStore

nfs

flocker

gitRepo

persistentVolumeClaim

azureFileVolume

Description

Mounts an AWS EBS volume into a pod. The volume is persistent, as its

contents are not deleted when the pod is deleted; the volume is unmounted.

The node on which pods are running must be an Amazon EC2 instance in

the same region and availability zone as the EBS volume. A single instance

may mount an EBS volume.

A persistent volume; mounts a Network File System (NFS) into a pod.

Mounts a Flocker dataset into a pod. Flocker is an open-source clustered

container data volume manager.

Clones a Git repository into an empty directory.

Mounts a PersistentVolume into a pod.

Mounts a Microsoft Azure File Volume into a pod.

This chapter looks at the following topics:

Setting the Environment

Creating a AWS Volume

Using a awsElasticBlockStore Volume

Creating a Git Repo

Using a gitRepo Volume

Setting the Environment

We will create an AWS CloudFormation on CoreOS for a Kubernetes cluster. To start, create a single EC2

instance from an Amazon Linux AMI.

SSH log in to the EC2 instance using the public IP address:

ssh -i "docker.pem" ec2-user@54.173.38.246

Spin up a CloudFormation consisting of a single controller and three worker nodes as shown in

Figure 6-2.

Figure 6-2. CloudFormation EC2 instances

137

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

Saved successfully!

Ooh no, something went wrong!