8 Storage implementation and modeling

 

This chapter covers

  • Exploring how dynamic storage works
  • Utilizing emptyDir volumes in workloads
  • Managing storage with CSI providers
  • Using hostPath values with CNI and CSI
  • Implementing storageClassTemplates for Cassandra

Modeling storage in a Kubernetes cluster is one of the most important tasks that an administrator needs to do before going to production. This entails asking yourself questions about what your storage needs are for a production application, and there are several dimensions to this. You’ll want to generally ask yourself the following questions for any application that needs persistent storage:

8.1 A microcosm of the broader Kubernetes ecosystem: Dynamic storage

8.1.1 Managing storage on the fly: Dynamic provisioning

8.1.2 Local storage compared with emptyDir

8.1.3 PersistentVolumes

8.1.4 CSI (container storage interface)

8.2 Dynamic provisioning benefits from CSI but is orthogonal

8.2.1 StorageClasses

8.2.2 Back to the data center stuff

8.3 Kubernetes use cases for storage

8.3.1 Secrets: Sharing files ephemerally

8.4 What does a dynamic storage provider typically look like?

8.5 hostPath for system control and/or data access

8.5.1 hostPaths, CSI, and CNI: A canonical use case

8.5.2 Cassandra: An example of real-world Kubernetes application storage

8.5.3 Advanced storage functionality and the Kubernetes storage model

8.6 Further reading

Summary