apiVersion: apps/v1
kind: Deployment
metadata:
  name: postgres-deploy
  labels:
    name: postgres-deploy
    app: demo-voting-app
spec:
  replicas: 1
  selector: 
    matchLabels: 
      name: postgress-pod
      app: demo-voting-app

  template: 
    metadata:
      name: postgress-pod
      labels:
        name: postgress-pod
        app: demo-voting-app

    spec:
      containers:
        - name: postgress
          image: postgress
          ports:
            - containerPort: 5432
          env:
            - name: POSTGRES_USER
              value: "postgress"
            - name: POSTGRES_PASSWORD
              value: "postgres"