In the following set of exercises StatefulSets are presented in a practical manner. The PostgreSQL [11] RDBMS is used as an example as the database is both widely known and of great utility to any developer. The goal of the exercises are not to build a production grade automation for PostgreSQL but to illustrate StatefulSet concepts.
Designing the StatefulSet In order to create the PostgreSQL StatefulSet we proceed with the following steps:
Identify or build (a) container image(s) Specify a headless Service Specify a StatefulSet Provision the Service and StatefulSet Conduct simple experiments Start with finding a container image.
The Container Image An essential part of the StatefulSet for PostgreSQL is the database server itself. Luckily, there is no need to containerize PostgreSQL as this as already been done. Hence, use the official PostgreSQL Docker Image found at Docker Hub [1].……
Continue reading