apiVersion: v1
kind: Service
metadata:
  name: elasticsearch
  namespace: elastic
  labels:
    app: elasticsearch
spec:
  clusterIP: None
  ports:
  - port: 9200
    targetPort: 9200
    protocol: TCP
    name: http-1
  - port: 9300
    targetPort: 9300
    protocol: TCP
    name: http-2
  selector:
    app: elasticsearch