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 4 ■ Using Multiple Zones

Including the labels lists the nodes as being in three different zones, as shown in Figure 4-33.

Figure 4-33. Listing nodes including labels

A PersistentVolume (PV) is a provisioned networked storage in a cluster, and a PersistentVolumeClaim

(PVC) is a request for storage by a user. A PVC consumes PV resources just as a pod consumes node

resources. Next, we shall create a persistent volume claim and subsequently claim the volume in a pod

specification. The objective of the application is to demonstrate that a persistent volume cannot be attached

across zones. A persistent volume is labeled with the zone in which it is created, and a pod that makes

use of the persistent volume is allocated in the same zone as the persistent volume. First, create a JSON

specification file claim.yaml for a persistent volume claim:

sudo vi claim1.json

112

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

Saved successfully!

Ooh no, something went wrong!