How to expose elastic kubernetes cluster in Googlecloud to external ip?

12/29/2018

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 ?

-- Harshdeep Kanhai
elasticsearch
kubernetes

1 Answer

12/29/2018

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.

-- codebreach
Source: StackOverflow