For production environments, it's common to use a more complex logging system (beyond basic container level logging). Often logging systems need to query and collect data, access entire pipelines, and generate analysis logs. For this type of advanced aggregated logging across the entire cluster, KALM provides some simple out of the box logging system solutions.
EFK (Elasticsearch) and PLG (Loki) are the most popular logging systems at the moment. They each have their own advantages and Kalm supports them both.
Using PLG (Promtail + Loki + Grafana)
The key component in this stack is Loki. Loki has a set of components which are internally referred to as modules. Each component spawns a gRPC server for internal traffic and an HTTP/1 server for external API requests.
There are two ways to deploy Loki - monolithic mode and microservices mode.
Monolithic mode (single process mode)
Monolithic mode (single process mode) is ideally suited for local development, small workloads, and for evaluation purposes.
- Make sure KALM is installed on your cluster.
- Make sure you have kubectl and it is configured to your cluster.
- Make sure your cluster has at least 500m cpu and 800Mi memory (each node has at least 100m cpu and 100Mi) to install PLG.
Install PLG on KALM
Run the following command to install the monolithic mode PLG. In the future, this step will be able to be done through the web interface.
View & Query logs
Let's view grafana log by visiting this link.
Don't worry about the permissions. As long as you don't give it a route, it will be only accessible locally with port-forwarding. External access with permissions is currently under development.
Work in progress.
Using EFK (Elasticsearch + Filebeat + Kibana)
Work in progress.