apiVersion: extensions/v1beta1
kind: Deployment
metadata:
  labels:
    app: postgres
  name: dex-postgres
spec:
  replicas: 1
  template:
    metadata:
      labels:
        app: postgres
    spec:
      containers:
          - image: postgres
            name: dex-postgres
            ports:
            - containerPort: 5432
              name: postgres-port
---
apiVersion: v1
kind: Service
metadata:
  labels:
    app: postgres
  name: dex-postgres
spec:
  ports:
    - port: 5432
  selector:
    app: postgres
