apiVersion: apps/v1
kind: Deployment
metadata:
  name: postgres-deployment
  namespace: tools
  labels:
    app: postgres 
spec:
  replicas: 1
  selector:
    matchLabels:
      app: postgres
  template:
    metadata:
      labels:
        app: postgres
    spec:
      containers:
        - name: postgres 
          image: arm32v7/postgres:10.9
          env:
          - name: POSTGRES_PASSWORD
            value: postgres
          volumeMounts:
          - name: postgres
            mountPath: /var/lib/postgresql/data
      volumes:
      - name: postgres
        persistentVolumeClaim:
          claimName: postgres-pvc
