apiVersion: v1
kind: Service
metadata:
  name: postgres
  namespace: kube-system
  labels:
    app: postgres
spec:
  type: ClusterIP
  ports:
    - name: postgres
      targetPort: 5432
      port: 5432
  selector:
    app: postgres