apiVersion: v1
kind: Service
metadata:
  name: elastic
  labels:
    app: elastic
spec:
  selector:
    app: elastic
  ports:
  - port: 9200
    targetPort: 9200
    protocol: TCP
    name: elastic-db
  - port: 9300
    targetPort: 9300
    protocol: TCP
    name: elastic-tp