apiVersion: v1
kind: Service
metadata:
  name: elasticsearch
  namespace: default
  labels:
    app: elasticsearch
spec:
  ports:
  - name: tcp-9200
    protocol: TCP
    port: 9200 
    targetPort: 9200   
  - name: tcp-9300
    protocol: TCP
    port: 9300 
    targetPort: 9300
  selector:
    app: elasticsearch
  type: LoadBalancer
  sessionAffinity: None
