Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Note!

You need to have a proper AKS cluster setup in order to proceed with these steps. Refer to Set Up Kubernetes Cluster - Azure (4.3) to create the OKE AKS cluster first.

Insert excerpt
Log Collection
Log Collection
nameKubernetes-output
nopaneltrue

To get a production ready log configuration you can use tools from the Kubernetes ecosystem and Azure Log Analytics Service. In this guide we show you how to set up:

...

These tools give you powerful and flexible log collection, storage, monitoring and visualization. The Elasticsearch database storage also provides powerful tools to perform analytics on the log data. The Azure Log Analytics is a tool for querying monitoring logs built for DevOps engineers, developers, site reliability engineers (SREs), IT managers, and product owners. See the official user documentation for detailed information about these tools.

Prerequisite

Insert excerpt
Log Collection
Log Collection
nameprereq
nopaneltrue

AKS Container Insights

You can collect, store and analyze logs and event data for container debugging purpose. To enable container insights, go to Home > your-cluster-name > Monitoring > Logs. Click Configure monitoring to proceed.

...

Azure Log Analytics

You can log data from Azure Monitor in a Log Analytics workspace. Azure provides an analysis engine and a rich query language. The logs show the context of any problems, and are useful for identifying root causes.

...

For more information, refer to Azure Log Analytics tutorial.

...

Stream Container Logs to Elastic Search and

...

Visualize with Kibana

Note

Important

Note that you You must install Elastic Search, Fluent-bit and Kibana on the same namespace in order to allow working properly. These are some of the reasons:

  • Elastic Search service needs to be accessible by Fluent-bit and Kibana to establish connection.

  • Kibana required Elastic Search master cert secret presented on the namespace.

Hence, in this guide we are using namespace 'logging' for the installations.

Install Elastic Search

Elastic Search will be installed to the namespace logging

...

Info

Example - Installing Elasticsearch without Persistent storage

This example installs Elasticsearch without persistent storage. Refer to Elasticsearch Helm chart documentation for help to enable persistent storage:

https://github.com/elastic/helm-charts/tree/master/elasticsearch

Code Block
helm install elasticsearch elastic/elasticsearch -n amazon-cloudwatch --set=persistence.enabled=false

Install Fluent-bit

Fluent-bit will be installed in the same namespace as Elastic Search, that is logging.

...

  1. Get the username and password credential for Elastic X-Pack access with the following commandcommands:

Code Block
kubectl get secrets --namespace=logging elasticsearch-master-credentials -ojsonpath='{.data.username}' | base64 -d
Code Block
kubectl get secrets --namespace=logging elasticsearch-master-credentials -ojsonpath='{.data.password}' | base64 -d

The decrypted username and password are the value set to HTTP_User and HTTP_Passwd in the [OUTPUT] directive.

...

Code Block
kubectl logs <fluent-bit pod name> -n logging

Install Kibana

Kibana will be installed to the same namespace as Fluent-bit, i.e., logging. 

...

Code Block
helm install kibana elastic/kibana -n logging --set=service.type=LoadBalancer --set=service.port=80

Configure Kibana

Kibana is a visual interface tool that allows you to explore, visualize, and build a dashboard over the log data massed in Elastic Search cluster. 

...