How do you manage stateful applications in Kubernetes?
Managing stateful applications in Kubernetes requires a clear understanding of all the risks of putting the stateful components in the container environment. For a relational database with business-critical information, we’d recommend using managed services or dedicated hosts to deploy it. For everything else (caches, NoSQL databases, and so on), you should know what kind of options Kubernetes provides you to maintain a stateful application.
We’ll begin this section with a quick overview of the key concepts for managing stateful applications in Kubernetes, then dive deeper into these topics in the following subsections.
Stateful applications typically require persistent storage to store data beyond the life cycle of individual Pods. Kubernetes provides PVs and PVCs to manage persistent storage. PVs represent storage resources provisioned by the cluster, while PVCs are requests for storage by Pods. By creating...