---
apiVersion: v1
kind: Service
metadata:
  name: mongodb-headless
  namespace: database
spec:
  type: ClusterIP
  clusterIP: None
  publishNotReadyAddresses: true
  ports:
  - name: mongodb
    port: 27017
    targetPort: mongodb
  selector:
    app.kubernetes.io/name: mongodb
    app.kubernetes.io/component: mongodb
