apiVersion: v1
kind: Service
metadata:
  name: elasticsearch
  labels:
    app: elasticsearch
spec:
  ports:
  - name: http
    port: 9200
    targetPort: http
  - name: transport
    port: 9300
    targetPort: transport
  selector:
    app: elasticsearch