Skip to content
This repository was archived by the owner on Nov 7, 2018. It is now read-only.
This repository was archived by the owner on Nov 7, 2018. It is now read-only.

using Java API to access the elasticsearch running in the kubernetes #142

Open
@shengbiaohong

Description

@shengbiaohong

Hello,everyone.I am now following this project https://github.com/pires/kubernetes-elasticsearch-cluster and successfully running the elasticsearch in kubernetes. And I also get the elasticsearch health status by the command "curl http://Endpoint:9200".It seems that the elasticsearch now running in the kubernetes and I can use the restful api to access the elasticsearch.Now I want to use Java API to access elasticsearch and insert some data to the exit index.How should I do?Do I use the 9300 port?
In this project,there are two service named elasticsearch and elasticsearch-discovery.In the file named es-discovery-svc.yaml, I found the 9300 port is exposed.I edit the es-discovery-svc.yaml and let the 9300 port mapped the 30003 port in the host.When I use the host IP and the 30003 port to connect the elasticsearch and add some data,it failed.The error show "NodeDisconnectedException:22.106.103.30:30003 cluster:monitor/nodes/liveness disconnected".How should I do?Thanks a lot if you know how to solve this problem.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions