diff --git a/README.md b/README.md index f7aa63b8407b4dc2f6afbeacc0ed1fe2b37653b2..17fc539064500b15725576715c45b8805340688e 100644 --- a/README.md +++ b/README.md @@ -130,6 +130,11 @@ Once succesfully completed, you can see the docker image in the `Registry`sectio * Persistent Volume Claim + As a Docker image is immutable, you may need to define some persistent storage. In the case of a PostgreSQL container we need to persist the data of the database. + + We do this using a `Persistent Volume Claim`. + > You can see that we define an `accessModes`to `ReadWriteOnce`, this mean that the Persistent Volume will only be accessed by one container. + ```yaml apiVersion: v1 kind: PersistentVolumeClaim @@ -147,6 +152,12 @@ Once succesfully completed, you can see the docker image in the `Registry`sectio * PostgreSQL secret + We are here defining the PostgreSQL basic parameters : username, password and database. This `Secret` will be reused later in `Deployments`. + + > Note: the data have to be base64 encoded. This can be done online or by command line on MacOS or Linux + +  + ```yaml apiVersion: v1 kind: Secret @@ -154,12 +165,13 @@ Once succesfully completed, you can see the docker image in the `Registry`sectio name: postgresql-credentials type: Opaque data: - username: YWRtaW4= - password: MWYyZDFlMmU2N2Rm - database: XXXXXXXXXXXXXXXX + username: cG9sbHNfdXNlcgo= + password: c2xsb3BfYzNiaQo= + database: cG9sbHMK ``` * PostgreSQL Deployment + ```yaml apiVersion: extensions/v1beta1 kind: Deployment diff --git a/img/base64.png b/img/base64.png new file mode 100644 index 0000000000000000000000000000000000000000..16ba29da7c677b3d088ddcec679cb95df1e74faf Binary files /dev/null and b/img/base64.png differ