apiVersion: apps/v1
kind: Deployment
metadata: 
  name: postgres-app-deploy
  labels: 
    name: postgres-app-deploy
    type: sample-voting-app
spec: 
  replicas: 1
  selector:
    matchLabels:
      name: postgres-app-deploy
      type: sample-voting-app
  template: 
    metadata: 
      name: postgres-pod
      labels: 
        name: postgres-app-deploy
        type: sample-voting-app
    spec: 
      containers: 
        - name: postgres
          image: postgres:9.4
          env: 
          - name: POSTGRES_PASSWORD
            value: password
          - name: POSTGRES_HOST_AUTH_METHOD
            value: trust 
          ports: 
          - containerPort: 5432  


