apiVersion: v1
kind: Service
metadata:
  name: elasticsearch
  namespace: monitoring
  labels:
    app: elasticsearch
spec:
  type: NodePort
  ports:
    - name: rest
      port: 9200
    - name: node
      port: 9300
  selector:
    app: elasticsearch