apiVersion: v1
kind: Service
metadata:
  name: elasticsearch
  labels:
    app.kubernetes.io/name: elasticsearch
spec:
  ports:
    - port: 9200
      protocol: TCP
      targetPort: db
  selector:
    app.kubernetes.io/name: elasticsearch