๐Ÿš€ ๐Œ๐จ๐ง๐ข๐ญ๐จ๐ซ๐ข๐ง๐  & ๐‹๐จ๐ ๐ ๐ข๐ง๐  ๐Š๐ฎ๐›๐ž๐ซ๐ง๐ž๐ญ๐ž๐ฌ ๐ฐ๐ข๐ญ๐ก ๐„๐‹๐Š ๐š๐ง๐ ๐…๐ข๐ฅ๐ž๐›๐ž๐š๐ญ ๐ŸŒ

Muhammad Usama Khan
2 min readDec 18, 2023

Logging is a critical tool/process for monitoring application(s) behaviour in the world of Kubernetes. Itโ€™s the heartbeat that ensures smooth operations, allowing timely detection and resolution of issues critical for production workloads.

It is really important to understand Kubernetes logging as it helps in effective troubleshooting and mitigating application issues that may arrive later.

In the below GIF, I used the Kubernetes SideCar approach for effective logging and monitoring.
More on Kubernetes logging and Side Car approach: https://kubernetes.io/docs/concepts/cluster-administration/logging/

๐“๐ก๐ž ๐’๐ข๐๐ž๐œ๐š๐ซ ๐š๐ฉ๐ฉ๐ซ๐จ๐š๐œ๐ก ๐š๐ฌ๐ฌ๐ข๐ ๐ง๐ฌ ๐š ๐๐ž๐๐ข๐œ๐š๐ญ๐ž๐ ๐ฅ๐จ๐ ๐ ๐ข๐ง๐  ๐š๐ ๐ž๐ง๐ญ ๐ญ๐จ ๐ž๐š๐œ๐ก ๐๐Ž๐ƒ. It uses more resources but offers flexibility and isolation, making it ideal for sizable K8s clusters or clusters supporting multiple business entities like PAAS platforms.

K8s Logging

๐Ÿ“ /Log/xxx โ€” Pods on worker nodes put their stories in a dedicated log directory, plain and simple.

๐Ÿšข Filebeat Container (Logging agent) โ€” Every POD has it, snatching those logs from application containers. It takes logs and ships them to Logstash forโ€ฆ

--

--

Muhammad Usama Khan
Muhammad Usama Khan

Written by Muhammad Usama Khan

LinkedIn Top Voice | DevOps/SRE Expert ๐Ÿš€ | Certified Cloud Consultant โ˜๏ธ | AWS, Azure, GCP, OTC | AI & Data | ๐Ÿ”” https://www.linkedin.com/in/usama-khan-791b0

No responses yet