Step-by-Step Deployment of the ELK Stack (Elasticsearch, Logstash, Kibana, Filebeat) on Kubernetes Using Docker and Helm
This guide details how to deploy Elasticsearch, Logstash, Kibana, and Filebeat on a Kubernetes cluster by pulling Docker images, customizing Helm chart values, installing the charts, and verifying pod status, providing a complete end‑to‑end ELK stack setup procedure.
1. Deploy Elasticsearch
Pull the required Docker images:
docker pull docker.elastic.co/elasticsearch/elasticsearch:7.17.2docker pull docker.elastic.co/kibana/kibana:7.17.2docker pull docker.elastic.co/logstash/logstash:7.17.2docker pull docker.elastic.co/beats/filebeat:7.17.2Create a namespace for the ELK stack: kubectl create namespace elk Download the Elasticsearch Helm chart and inspect its files:
helm fetch elastic/elasticsearchcd elasticsearch/Modify values.yaml to reduce resource requirements (set master node count to 1 and disable high‑availability settings).
Install the chart:
helm install elasticsearch -f values.yaml elastic/elasticsearch --namespace elkVerify the deployment:
kubectl describe pod elasticsearch-master-0 -n elkkubectl get pods -n elk -l app=elasticsearch-master2. Deploy Logstash
Download the Logstash chart and extract it:
helm fetch elastic/logstashtar -zxvf logstash-7.17.3.tgzAdjust values.yaml as needed, then install:
helm install logstash -f values.yaml elastic/logstash --namespace elkPull the Logstash Docker image and watch the pods:
docker pull docker.elastic.co/logstash/logstash:7.17.2kubectl get pods --namespace=elk -l app=logstash-logstash -w3. Deploy Filebeat
Fetch the Filebeat chart, extract it, and install:
helm fetch elastic/filebeattar -zxf filebeat-7.17.3.tgzhelm install filebeat elastic/filebeat --namespace elkPull the Filebeat Docker image and verify the pods:
docker pull docker.elastic.co/beats/filebeat:7.17.2kubectl get pods --namespace=elk -l app=filebeat-filebeat4. Deploy Kibana
Pull the Kibana image and download its Helm chart:
docker pull docker.elastic.co/kibana/kibana:7.17.2helm fetch elastic/kibanaEdit values.yaml to change the service type to NodePort, then install:
helm install kibana01 -f values.yaml elastic/kibana --namespace elkCheck the Kibana pod status: kubectl get pods --namespace=elk -o wide After all components are running, the ELK stack is ready for log collection, processing, and visualization.
Signed-in readers can open the original source through BestHub's protected redirect.
This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactand we will review it promptly.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
