Working with EFK
In the Container world, log management always faces a technical difficulty, because Container has its own filesystem, and when Container is dead or evicted, the log files are gone. In addition, Kubernetes can easily scale out and scale down the Pods, so we need to care about a centralized log persistent mechanism.
Kubernetes has an add-on for setting up centralized log management, which is called EFK. EFK stands for Elasticsearch, Fluentd, and Kibana. These applications' stack bring you a full function of log collection, indexing, and UI.
Getting ready
In Chapter 1, Building Your Own Kubernetes Cluster, we set up our Kubernetes cluster with several different provisioning tools. Based on your Kubernetes provisioning tool, there is an easy way to set up EFK stack. Note that Elasticsearch and Kibana are heavy-duty Java applications. They require at least 2 GB of memory each.
Therefore, if you use minikube, your machine should have at least 8 GB of memory (16 GB is recommended)...