Pod Persistence
摘要
In the previous chapter, we saw how Kubernetes (K8s) mounts the service account (SA) tokens in a folder within a container running inside a pod. Files or on-disk folders such as the SA folder are ephemeral because they “die” with their pods. In other words, they have the lifetime of their pods. Data stored in the folder is deleted and lost when pods that host them cease to exist. K8s provides ways to persist data to stay permanent even if pods are destroyed. This chapter will discuss options available for creating persistent storages so that data is retained even when pods are destroyed. We will briefly touch on ephemeral volume types before we delve into persistent volumes.