Skip to content

This is Statefulset in Kubernetes which makes Single node ELK and APM Server for Elastic.

License

Notifications You must be signed in to change notification settings

bon10/simple-k8s-elasticsearch

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Single Node ELK on the Kubernetes

Whhat is this?

Builds a simple ELK single cluster on Kubernetes. Suitable for development especially Ruby.

Required

  • Kubernetes v1.14 later.
  • Space must be reserved for Local Volume to use.
$ ssh k8s-node
$ sudo mkdir -p /mnt/disks/vol1
$ sudo chmod 777 /mnt/disks/vol1

How to use

$ kubectl config get-contexts
$ sudo chmod a+x ./create.sh
$ ./create.sh

Attributes

Namespace: elasticsearch
StatefulSet: elasticsearch
Deployment: logstash,kibana,apm-server

Service:
logstash: Internal 5044 / NodePort 30014
elasticsearch: Internal 9200 / NodePort 31001
kibana: Internal 5601 / NodePort 31000

FYI

Use Elasticsearch plugins

Edit Dockerfile and build&push container for your Docker registry.

# Plugin install
RUN bin/elasticsearch-plugin install --batch repository-s3

# keysstore
RUN bin/elasticsearch-keystore create
RUN echo "S3_ACCESS_KEY" | bin/elasticsearch-keystore add s3.client.default.access_key
RUN echo "S3_SECRET_KEY" | bin/elasticsearch-keystore add s3.client.default.secret_key
$ docker build -t sample.com/elasticsearch:latest .
$ docker push sample.com/elasticsearch:latest

And change image on kubernetes/elasticsearch-statefulset.yaml like:

containers:
  - name: es-client
    image: sample.com/elasticsearch:latest

About

This is Statefulset in Kubernetes which makes Single node ELK and APM Server for Elastic.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published