apiVersion: v1
kind: Service
metadata:
  name: postgres
  namespace: openfaas-db
  labels:
    app: postgres
spec:
  type: ClusterIP
  ports:
    - port: 5432
      protocol: TCP
  selector:
    app: postgres
# spec:
#   type: ExternalName
#   clusterIP: None
#   externalName: service-x.namespace-b.svc.cluster.local
#   ports:
#   - name: db-port
#     nodePort: 31704
#     port: 5432

  