Introduction
From everything that you have learned up until this point, you know that pods and the containers that run in them are considered ephemeral. This means that they are not to be depended upon for stability as Kubernetes will intervene and move them around the cluster in order to comply with the desired state specified by the various manifests in the cluster. But there's a problem in this – what do we do with the parts of our applications that depend on the state being persisted from one interaction to the next? Without certain guarantees such as predictable naming for the pods and dependable storage operations, which we will learn about later in the chapter, such stateful components may fail if Kubernetes restarts the relevant pods or moves them around. However, before diving into the details of the aforementioned topics, let's talk briefly about stateful apps and why it's challenging to run them in a containerized environment.