Skip to content
Snippets Groups Projects
Commit 6f18dbcb authored by Thomas  MENARD's avatar Thomas MENARD
Browse files

Update README

parent e51a4ea7
No related branches found
No related tags found
No related merge requests found
...@@ -130,6 +130,11 @@ Once succesfully completed, you can see the docker image in the `Registry`sectio ...@@ -130,6 +130,11 @@ Once succesfully completed, you can see the docker image in the `Registry`sectio
* Persistent Volume Claim * 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 ```yaml
apiVersion: v1 apiVersion: v1
kind: PersistentVolumeClaim kind: PersistentVolumeClaim
...@@ -147,6 +152,12 @@ Once succesfully completed, you can see the docker image in the `Registry`sectio ...@@ -147,6 +152,12 @@ Once succesfully completed, you can see the docker image in the `Registry`sectio
* PostgreSQL secret * 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
![alt text](img/base64.png)
```yaml ```yaml
apiVersion: v1 apiVersion: v1
kind: Secret kind: Secret
...@@ -154,12 +165,13 @@ Once succesfully completed, you can see the docker image in the `Registry`sectio ...@@ -154,12 +165,13 @@ Once succesfully completed, you can see the docker image in the `Registry`sectio
name: postgresql-credentials name: postgresql-credentials
type: Opaque type: Opaque
data: data:
username: YWRtaW4= username: cG9sbHNfdXNlcgo=
password: MWYyZDFlMmU2N2Rm password: c2xsb3BfYzNiaQo=
database: XXXXXXXXXXXXXXXX database: cG9sbHMK
``` ```
* PostgreSQL Deployment * PostgreSQL Deployment
```yaml ```yaml
apiVersion: extensions/v1beta1 apiVersion: extensions/v1beta1
kind: Deployment kind: Deployment
......
img/base64.png

53 KiB

0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment