cloudnet-compose/k8s-specifications/db-deployment.yaml

35 lines
646 B
YAML
Raw Normal View History

apiVersion: apps/v1
2018-03-05 12:57:48 +01:00
kind: Deployment
metadata:
labels:
app: db
2018-03-05 12:57:48 +01:00
name: db
namespace: vote
2018-03-05 12:57:48 +01:00
spec:
replicas: 1
selector:
matchLabels:
app: db
2018-03-05 12:57:48 +01:00
template:
metadata:
labels:
app: db
spec:
containers:
- image: postgres:9.4
name: postgres
env:
- name: POSTGRES_USER
value: postgres
- name: POSTGRES_PASSWORD
value: postgres
ports:
- containerPort: 5432
name: postgres
2018-03-05 12:57:48 +01:00
volumeMounts:
- mountPath: /var/lib/postgresql/data
name: db-data
volumes:
- name: db-data
emptyDir: {}