apiVersion: v1
kind: Service
metadata:
  name: postgres
  namespace: postgres
  labels:
    app.kubernetes.io/name: postgres
    app.kubernetes.io/part-of: postgres
spec:
  type: ClusterIP
  ports:
  - port: 5432
    targetPort: 5432
  selector:
    app.kubernetes.io/name: postgres
    app.kubernetes.io/part-of: postgres
