apiVersion: v1
kind: Service
metadata:
  name: postgres-svc
  labels:
    app: postgres
    version: v1
spec:
  selector:
    app: postgres
  type: ClusterIP
  ports:
  - port: 5432
    protocol: TCP
    targetPort: 5432