So far, everything was fun and games. We built services, deployed them to Kubernetes, and ran commands and queries against these services. We enabled Kubernetes to have those services up and running by scheduling pods on deployment or if anything went wrong. This works great for stateless services that can just run anywhere. In the real world, distributed systems manage important data. If a database stores its data on the host filesystem and that host goes down, you (or Kubernetes) can't just start a fresh instance of the database on a new node because the data will be lost.
In general, you keep your data from getting lost by redundancy; you keep multiple copies, store backups, utilize append-only logs, and more. Kubernetes assists by providing a whole storage model with concepts and related resources, such as volumes, volume claims, and StatefulSets...