|
1 | | -# Chart Installation |
| 1 | +# Elasticsearch Helm Chart |
| 2 | + |
| 3 | +This chart installs a working version of Elasticsearch cluster on Kubernetes. |
| 4 | + |
| 5 | +#### Installation |
| 6 | + |
| 7 | +Values.yaml container configuration for Elasticsearch cluster. |
| 8 | +Note: Minimum of 2 Master Nodes are required for elasticsearch cluster |
| 9 | + |
2 | 10 | ``` |
3 | 11 | helm install elasticsearch |
4 | 12 |
|
5 | 13 | ``` |
6 | | -Make sure all pods are up and are in running state |
| 14 | +### To verify the helm deployment was successful: |
7 | 15 |
|
8 | 16 | ``` |
9 | | -kubectl get pods |
| 17 | +helm list |
| 18 | +``` |
| 19 | + |
| 20 | +### To conform all pods are up and running: |
10 | 21 |
|
11 | 22 | ``` |
| 23 | +kubectl get pods |
12 | 24 |
|
13 | | -# Testing: |
| 25 | +``` |
14 | 26 |
|
15 | | -1) kubectl get svc |
| 27 | +### To view list of services |
16 | 28 |
|
17 | 29 | ``` |
18 | | -svc/elasticsearch-discovery 10.104.199.12 <none> 9300/TCP 13m |
19 | | -svc/es-client 10.103.178.186 <pending> 9200:30880/TCP 13m |
| 30 | +kubectl get svc |
20 | 31 | ``` |
21 | 32 |
|
22 | | -2) Within cluster, check if healthy cluster |
23 | 33 | ``` |
24 | | -curl http://10.103.178.186:9200 |
| 34 | +elasticsearch-discovery 10.99.148.252 <none> 9300/TCP 47m |
| 35 | +elasticsearch-logging 10.105.222.126 <pending> 9200:31070/TCP 47m |
| 36 | +``` |
25 | 37 |
|
| 38 | +### Test elasticsearch functionality: |
26 | 39 |
|
27 | | -curl http://10.103.178.186:9200/_cluster/health?pretty |
| 40 | +From any host within cluster.. |
28 | 41 |
|
| 42 | +1) Check if Elasticsearch cluster is up |
| 43 | +``` |
| 44 | +curl http://10.105.222.126:9200 |
| 45 | +``` |
| 46 | +``` |
| 47 | +curl http://10.105.222.126:9200/_cluster/health?pretty |
29 | 48 | ``` |
30 | | -3) Store data manually |
31 | 49 |
|
| 50 | +2) Store data manually using APIs |
32 | 51 | ``` |
33 | | -curl -XPUT 'http://10.103.178.186:9200/blog/user/renmak' -d \ |
| 52 | +curl -XPUT 'http://10.105.222.126:9200/blog/user/renmak' -d \ |
34 | 53 | '{ "name" : "Dilbert Brown" }' |
35 | | -
|
36 | | -
|
37 | | -curl -XPUT 'http://10.103.178.186:9200/blog/post/1' -d \ |
| 54 | +``` |
| 55 | +``` |
| 56 | +curl -XPUT 'http://10.105.222.126:9200/blog/post/1' -d \ |
38 | 57 | '{ "user":"renmak", "title":"how to test ES"}' |
39 | 58 | ``` |
40 | | -4) Retrive data |
| 59 | +3) Retrive data manually using APIs |
41 | 60 | ``` |
42 | | -curl -XGET 'http://10.103.178.186:9200/blog/user/renmak?pretty=true' |
| 61 | +curl -XGET 'http://10.105.222.126:9200/blog/user/renmak?pretty=true' |
43 | 62 |
|
44 | | -curl -XGET 'http://10.103.178.186:9200/blog/post/1?pretty=true' |
| 63 | +curl -XGET 'http://10.105.222.126:9200/blog/post/1?pretty=true' |
45 | 64 |
|
46 | | -curl -XGET 'http://10.103.178.186:9200/blog/post/_search?q=user:renmak&pretty=true' |
| 65 | +curl -XGET 'http://10.105.222.126:9200/blog/post/_search?q=user:renmak&pretty=true' |
47 | 66 |
|
48 | | -curl -XGET 'http://10.103.178.186:9200/_search?q=*renmak&pretty=true' |
| 67 | +curl -XGET 'http://10.105.222.126:9200/_search?q=*renmak&pretty=true' |
49 | 68 |
|
50 | 69 | ``` |
51 | 70 |
|
0 commit comments