apiVersion: apps/v1
kind: Deployment
metadata:
  name: postgres-db
  namespace: demo
spec:
  selector:
    matchLabels:
      app: postgres-db
  replicas: 1
  template:
    metadata:
      labels:
        app: postgres-db
    spec:
      containers:
        - name: postgresql-db
          image: postgres:latest
          env:
            - name: POSTGRES_PASSWORD
              value: postgres
            - name: POSTGRES_HOST_AUTH_METHOD
              value: "md5"
