I have setup a kubernetes cluster of elasticsearch in GCP.
kubectl get svc
gives me
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
ipgram-elasticsearch-elasticsearch-svc ClusterIP 10.27.247.26 <none> 9200/TCP,9300/TCP 2h
How to set an external IP for this ?
You have to convert the service to be of type LoadBalancer
which will assign an external IP to the LB or NodePort
and then use the nodes IP.