apiVersion: v1
kind: Pod
metadata:
  name: pod-postgres
  labels:
    db: postgres
spec:
  containers:
  - name: postgres-db
    image: postgres:9.6-alpine
    env:
    - name: POSTGRES_PASSWORD
      value: <you postgres user password>
    ports:
    - name: postgres-port
      containerPort: 5432
    volumeMounts:
                - mountPath: /var/lib/postgresql
                  name: postgres-vol
  volumes:
  - name: postgres-vol
    persistentVolumeClaim:
      claimName: postgres-pvc
