Setting up EFK for AKS and EKS clusters
Elasticsearch, Fluentd, and Kibana (EFK) is a set of logging solution. It helps you view the application logs. This section guides you on installing EFK. Before you deploy the EFK, make sure that you have met the following prerequisites.
Prerequisites
- Kubernetes 1.16+
- Helm 3+
Elasticsearch
Elasticsearch maintains the index of all the logs for each microservice pushed to it by Fluentd.
Prerequisites
Minimum cluster requirements include the following to run the Elasticsearch helm chart with default settings. All of these settings are configurable.
- Three Kubernetes nodes to respect the default "hard" affinity settings.
- 1GB of RAM for the JVM heap.
Installation
To deploy Elasticsearch, you need to follow the steps as given below.
-
Run the following command to add the Elasticsearch helm chart from the Elasticsearch helm repository.
-
Update the Helm repository by running the following command.
-
Run the helm install command as shown below to deploy Elasticsearch.
Fluentd
Fluentd collects the Adeptia application logs from Kubernetes and pushes them into Elasticsearch.
Installation
To deploy Fluentd, you need to follow the steps as given below.
-
Run the following command to add the Fluentd helm chart from the Fluentd helm repository.
-
Update the Helm repository by running the following command.
-
Run the helm install command as shown below to deploy Fluentd .
Once you have installed Fluentd, update your Fluentd ConfigMap using the Fluentd ConfigMap configuration given in the file below. This defines how to parse application logs and how to store the logs into Elasticsearch.
Fluentd ConfigMap
Kibana
Kibana is the graphical interface where you can view the microservices logs available in Elasticsearch.
Installation
To deploy Kibana, you need to follow the steps as given below.
-
Run the following command to add the Kibana helm chart from the Kibana helm repository.
-
Update the Helm repository by running the following command.
-
Run the helm install command as shown below to deploy Kibana.