Member-only story
Observability Deploying EFK Stack on EKS (AWS)
- Elasticsearch: A powerful search and analytics engine.
- Fluentd: A data collector that allows you to collect logs from various sources.
- Kibana: A visualization tool for data stored in Elasticsearch.
Prerequisites for Setting Up EFK Stack on AWS EKS
- AWS Account: will incurr little cost.
- Terraform: For infrastructure as code to create the EKS cluster.
- kubectl: For managing Kubernetes resources.
- Helm: To easily deploy the EFK stack components.
- GitHub Repository
- Clone this repo for EKS CLUSTER creation
https://github.com/CloudOps2029/Observability-Stack.git
1) Create IAM Role for Service Account
eksctl create iamserviceaccount \
— name ebs-csi-controller-sa \
— namespace kube-system \
— cluster observability \
— role-name AmazonEKS_EBS_CSI_DriverRole \
— role-only \
— attach-policy-arn arn:aws:iam::aws:policy/service-role/AmazonEBSCSIDriverPolicy \
— approve
2) Retrieve IAM Role ARN
ARN=$(aws iam get-role --role-name AmazonEKS_EBS_CSI_DriverRole --query 'Role.Arn' --output text)
3) Deploy EBS CSI Driver
eksctl create addon --cluster observability --name aws-ebs-csi-driver --version latest \
--service-account-role-arn $ARN --force
4) Create Namespace for Logging
kubectl create namespace logging
5) Install Elasticsearch on K8s
helm repo add elastic https://helm.elastic.co
helm install elasticsearch --set replicas=1 --set volumeClaimTemplate.storageClassName=gp2 --set persistence.labels.enabled=true elastic/elasticsearch -n logging
Install Kibana
helm install kibana --set service.type=LoadBalancer elastic/kibana -n logging
