@@ -128,7 +128,7 @@ In order to deploy a Postgresql server we need :
- [ ] Deployment
- [ ] Service
* 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.
...
...
@@ -150,7 +150,7 @@ resources:
storage:1Gi
```
* PostgreSQL secret
##### PostgreSQL secret
We are here defining the PostgreSQL basic parameters : username, password and database. This `Secret` will be reused later in `Deployments`.
...
...
@@ -170,7 +170,7 @@ password: c2xsb3BfYzNiaQo=
database:cG9sbHMK
```
* PostgreSQL Deployment
##### PostgreSQL Deployment
```yaml
apiVersion:extensions/v1beta1
...
...
@@ -223,7 +223,7 @@ template:
secretName:postgresql
```
* PostgreSQL Service
##### PostgreSQL Service
```yaml
apiVersion:v1
...
...
@@ -240,8 +240,8 @@ selector:
tier:postgreSQL
````
* Django Application
* Deployment
#### Django Application
##### Deployment
```yaml
apiVersion: extensions/v1beta1
...
...
@@ -288,7 +288,7 @@ selector:
secretName: postgresql
```
* Service
##### Service
```yaml
apiVersion: v1
...
...
@@ -306,7 +306,7 @@ selector:
app: polls
```
* Ingress Resource
##### Ingress Resource
```yaml
apiVersion: extensions/v1beta1
...
...
@@ -328,7 +328,7 @@ selector:
path: /
```
* Kubernetes Job
##### Kubernetes Job
We will use a `Job` in order to manage django migrations.
> Note: Kubernetes jobs are run only once opposed to `Deployments` that run continiously.