Getting started with Kubernetes (K8s)
Kubernetes (often shortened to k8s) is a container orchestration and management tool originally created by Google.
Kubernetes logging
Logs are records of events that have occurred within a system, Kubernetes logs can be divided into two broad categories:
- Those generated by Kubernetes itself e.g. DNS logs, those associated with changes in workloads running on the Kubernetes cluster, adding or removing nodes.
- Those generated by the applications running on top of Kubernetes - these might be from an nginx container logging the webpages being accessed, the front and backend code generating those pages or from any other workload deployed onto your cluster. To enabled Kubernetes logging we will be deploying Filebeat via a helmchart to capture both Kubernetes internal logs and those generated by the workloads deployed on top of Kubernetes.
You can find instructions for sending logs from Kubernetes here
Kubernetes Metrics
Metrics provide real-time data that gives administrators a snapshot of how system resources are performing. Monitoring metrics related to CPU usage, memory consumption, disk I/O, and network activity, offer an insight into the current health of a system.
The real power of collecting metrics is not just in real-time monitoring but in tracking trends over time. By collecting system performance data at regular intervals, allowing administrators to observe how system resources evolve over time.
For example, consistent CPU usage spikes or gradual increases in memory consumption could be early indicators of an application issue or resource leak. They can also be used to identify if your Kubernetes cluster is of an appropriate size, saving money
To do this we will be deploying telegraf via a helmchart to capture both Kubernetes internal metrics, those for individual workloads and stats for each node in the cluster
You can find instructions for sending metrics from Kubernetes here