apiVersion: v1
kind: Service
metadata:
  name: elasticsearch
  labels:
    app: elasticsearch
spec:
  type: NodePort
  ports:
    - port: 9200
      nodePort: 30920
      name: rest
    - port: 9300
      nodePort: 30930
      name: inter-node
  selector:
    app: elasticsearch