ELK
Elasticsearch, Logstash, Kibana
Deploy Elasticsearch
Setup the host node
The vm.max_map_count kernel setting needs to be set to at least 262144 for production use. Make sure the node(s) that will host Elasticsearch have the following config:
sysctl -w vm.max_map_count=262144Create the data dir:
mkdir /storage/storage-001/mnt-elasticsearch
chown nobody:nogroup /storage/storage-001/mnt-elasticsearch/Create the namespace
Connect to your kubectl workstation and create the namespace:
kubectl create namespace elkCreate the ConfigMap
Create Elasticsearch config file:
cat <<EOF >>elasticsearch.yml
cluster.name: "docker-cluster"
network.host: 0.0.0.0
discovery.zen.minimum_master_nodes: 1
discovery.type: single-node
EOFCreate its ConfigMap:
Deploy Elasticsearch
Run:
Create Elasticsearch service
Run:
Test
Get indices:
Post content:
Another example of post:
Deploy Logstash
Create the ConfigMap (config file)
Create the config file:
Create its ConfigMap:
Create the ConfigMap (pipeline)
Create the config file:
Create its ConfigMap:
Deploy
Connect to your node and create the data dir:
Connect to your kubectl workstation and run:
Create service
Run:
Test
Get service info:
Telnet test:
Deploy Kibana
Create the ConfigMap
Create the config file:
Create its ConfigMap:
Deploy
Connect to your node and create the data dir:
Connect to your kubectl workstation and run:
Create service
Run:
Test
Curl test:
Deploy filebeat
Example to stream log files from /elk/*.log to elasticsearch.
Text:
Text:
Text:
Text:
Text:
Text:
Last updated