Elasticsearch-logging rc and svc are getting automatically deleted

11/17/2015

https://github.com/GoogleCloudPlatform/kubernetes/tree/master/cluster/addons/fluentd-elasticsearch

The cluster is getting automatically deleted by using these configs to create the cluster.

From https://github.com/kubernetes/kubernetes/issues/11435 the solution is to remove

kubernetes.io/cluster-service: "true"

Though without these the elasticsearch is not available through the kubernetes master.

Should i create a pull request to remove the line from the files in the repo so people dont get confused?

-- Rolf Larsen
elasticsearch
kubernetes

1 Answer

11/17/2015

Firstly, I'd recommend reformatting future questions so they adhere to the stack overflow guidelines: https://stackoverflow.com/help/how-to-ask.

I'd recommend making Elasticsearch a normal Kubernetes Service. You can expose in one of the following ways:
1. Set service.Type = NodePort and access it via any public ip of node:nodePort
2. Set service.Type = LoadBalancer, this will only work on cloud providers that have loadbalancers
3. Expose the RC directly through a host port (not recommended)

Those are just the common options for accessing a Service, please see the following thread for a more detailed discussion: https://groups.google.com/forum/#!topic/kubernetes-sig-network/B-A_RuqpFWk

It's generally not a good idead to send all external traffic meant for a Kubernetes service through the apiserver. However if you must do so, you can via an endpoint such as:

/api/v1/proxy/namespaces/default/services/nginx:80/

Where default is the namespace, nginx is the name of your service and 80 is the service port (needed to disambiguate multiport services).

-- Prashanth B
Source: StackOverflow