Advanced Kubernetes concepts
In this section, we will discuss other important Kubernetes features, including how to assign permanent storage to StatefulSets
, how to store secrets such as passwords, connection strings, or certificates, how a container can inform Kubernetes about its health state, and how to handle complex Kubernetes packages with Helm. All subjects are organized in dedicated subsections. We will start with the problem of permanent storage.
Requiring permanent storage
Since pods are moved among nodes, they can't rely on the permanent storage offered by the current node where they are running. This leaves us with two options:
- Using external databases: With the help of databases,
ReplicaSets
can also store information. However, if we need a better performance in terms of write/update operations, we should use distributed sharded databases based on non-SQL engines such as Cosmos DB or MongoDB (see Chapter 9, How to Choose Your Data Storage...