apiVersion: v1
kind: Service
metadata:
  name: database
spec:
  type: ClusterIP
  ports:
    - port: 5432
      protocol: TCP
      name: postgres
      targetPort: 5432
  selector:
    component: postgres
