--- apiVersion: apps/v1 kind: Deployment metadata: name: postgres # Sets Deployment name spec: replicas: 1 selector: matchLabels: app: postgres template: metadata: labels: app: postgres spec: containers: - name: postgres image: postgres:16 # Sets Image ports: - containerPort: 5432 # Exposes container port envFrom: - configMapRef: name: postgres-config volumeMounts: - mountPath: /var/lib/postgresql/data name: postgredb volumes: - name: postgredb persistentVolumeClaim: claimName: postgresql-data-claim