7 Storage in Kubernetes

 

This chapter covers

  • Creating a volume in Kubernetes
  • Persistent volume claims and storage classes
  • Using storage with applications in Kubernetes

As we have seen from previous exercises, the life of a Pod is short, and so is the life of the data that resides in that Pod. To solve this problem and retain the data that a Pod uses, we create persistent volumes (PVs). On the exam, you’ll be tested on your ability to create a PV, as well as a persistent volume claim (PVC) and a storage class. We’ll discuss each of these topics in this chapter.

7.1 Persistent volumes

7.1.1 The problem with hostPath

7.1.2 Volume modes

7.1.3 Access modes

7.1.4 Reclaim policies

7.2 Persistent volume claim

7.3 Storage class

7.3.1 Inheriting from the storage class

7.4 Nonpersistent volumes

7.5 Summary