ELK docker GCP installation

2/14/2020

I have configured Kubernetes cluster on GCP and have reconfigured Docker based ELK.

The issue I'm facing is that I'm unable to use the kibana browser dashboard.

  • Where to set the URL ?
  • Where to get the external IP to access Kibana?
-- michel jonson
google-cloud-platform
kibana
kubernetes

1 Answer

2/14/2020

The issue I'm facing is that I'm unable to use the kibana browser dashboard. - Where to set the URL ?

You have to kubectl expose your kibana as LoadBalancer in order to gain external access.

LoadBalancer:

On cloud providers which support external load balancers, setting the type field to LoadBalancer provisions a load balancer for your Service.

The syntax is:

  • kubectl expose deployment kibana_deploy_name_here --port=5601 --target-port=5601 --name=kibana-external-url --type=LoadBalancer

Here is my reproduction:

$ kubectl get deployment
NAME                     READY   UP-TO-DATE   AVAILABLE   AGE
deployment.apps/kibana   1/1     1            1           14m

$ kubectl expose deploy kibana --port=5601 --target-port=5601 --name=kibana-external-url --type=LoadBalancer
service/kibana-external-url exposed

It will take a couple minutes in pending state:

$ kubectl get svc kibana-external-url
NAME                     TYPE           CLUSTER-IP   EXTERNAL-IP   PORT(S)          AGE
kibana-external-url      LoadBalancer   10.0.1.54    <pending>     5601:31781/TCP   7s

And will automatically assign an External IP for you:

$ kubectl get svc kibana-external-url
NAME                  TYPE           CLUSTER-IP   EXTERNAL-IP   PORT(S)          AGE
kibana-external-url   LoadBalancer   10.0.1.54    34.68.43.17   5601:31781/TCP   17m
  • Where to get the external IP to access Kibana?

Now just type the address assigned to your service + the port on your browser and you will be good to go.

enter image description here

(Ignore the message, It's just because I haven't configured ES.)

Let me know if you have any difficulties.

-- willrof
Source: StackOverflow