Skip to content
This repository has been archived by the owner on May 16, 2023. It is now read-only.

Commit

Permalink
Merge pull request #274 from salaboy/master
Browse files Browse the repository at this point in the history
Adding Example for Kubernetes KIND
  • Loading branch information
jmlrt authored Oct 11, 2019
2 parents f4040f5 + f8bdd12 commit 6533c9a
Show file tree
Hide file tree
Showing 3 changed files with 57 additions and 0 deletions.
9 changes: 9 additions & 0 deletions elasticsearch/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -262,6 +262,15 @@ cd examples/docker-for-mac
make
```

#### KIND - Kubernetes

It is also possible to run this chart using a Kubernetes [KIND (Kubernetes in Docker)](https://github.com/kubernetes-sigs/kind) cluster:

```
cd examples/kubernetes-kind
make
```

## Clustering and Node Discovery

This chart facilitates Elasticsearch node discovery and services by creating two `Service` definitions in Kubernetes, one with the name `$clusterName-$nodeGroup` and another named `$clusterName-$nodeGroup-headless`.
Expand Down
12 changes: 12 additions & 0 deletions elasticsearch/examples/kubernetes-kind/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
default: test

RELEASE := helm-es-kind

install:
helm upgrade --wait --timeout=900 --install --values values.yaml $(RELEASE) ../../

test: install
helm test $(RELEASE)

purge:
helm del --purge $(RELEASE)
36 changes: 36 additions & 0 deletions elasticsearch/examples/kubernetes-kind/values.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
---
# Permit co-located instances for solitary minikube virtual machines.
antiAffinity: "soft"

# Shrink default JVM heap.
esJavaOpts: "-Xmx128m -Xms128m"

# Allocate smaller chunks of memory per pod.
resources:
requests:
cpu: "100m"
memory: "512M"
limits:
cpu: "1000m"
memory: "512M"

# Request smaller persistent volumes.
volumeClaimTemplate:
accessModes: [ "ReadWriteOnce" ]
resources:
requests:
storage: 100M
extraInitContainers: |
- name: create
image: busybox:1.28
command: ['mkdir', '/usr/share/elasticsearch/data/nodes/']
volumeMounts:
- mountPath: /usr/share/elasticsearch/data
name: elasticsearch-master
- name: file-permissions
image: busybox:1.28
command: ['chown', '-R', '1000:1000', '/usr/share/elasticsearch/']
volumeMounts:
- mountPath: /usr/share/elasticsearch/data
name: elasticsearch-master

0 comments on commit 6533c9a

Please sign in to comment.