apiVersion: apps/v1
kind: Deployment
metadata:
  name: db
spec:
  selector:
    matchLabels:
      app: db
  replicas: 1
  strategy:
    type: Recreate
  template:
    metadata:
      labels:
        app: db
    spec:
      containers:
        - image: postgres
          name: db
          imagePullPolicy: Always
          ports:
            - containerPort: 5432
          env:
            - name: POSTGRES_USER
              value: todo
            - name: POSTGRES_PASSWORD
              value: todo
            - name: POSTGRES_DB
              value: tododb
