This repository hosts examples and instruction on how to simply configure efk stack on local kubernetes cluster.
Warning
The installation and configuration manifests are for demo purposes and are not suited for production environments.
we will follow below steps for this demo :
-
Setup local kubernetes cluster using docker desktop and KIND
-
install elastic search using helm
-
Install and config fluentd.
-
setup kibara to visualize metrics
Please first clone the repository on your local machine and change directory to the root of the this git repository.
We will use KIND to create a control-plane node with two worker nodes.
# In case any clusters already exists from previous atempts. run below:
# kind delete cluster --name my-cluster
kind create cluster --name my-cluster --image kindest/node:v1.22.0 --config demo-cluster.yaml
-
Run the command to add helm repo:
helm repo add stable https://charts.helm.sh/stable
-
install elastic search:
helm install elasticsearch stable/elasticsearch
- verify installation and access to service
kubectl port-forward svc/elasticsearch-client 9200
http://localhost:9200/
- verify elastic search indexes
http://localhost:9200/_cat/indices?v
-
install fluentd as daemonset:
- first we will create nessary Cluster role,serviceaccount and rolebinding objects
kubectl apply -f role_creation.yaml
kubectl apply -f fluentd-daemonset-elasticsearch.yaml
-
install kibana:
helm install kibana stable/kibana -f kibana-values.yaml
-
verify installation and access to service
kubectl port-forward svc/kibana 444:443
- Run Simple application to generate dummy logs
kubectl apply -f counter.yaml