In Kubernetes, logs can be used for debugging and monitoring activities to a certain level. Basic logging can be used to detect configuration problems, but for cluster-level logging, an external backend is required to store and query logs. Cluster-level logging will be covered in the Building centralized logging in Kubernetes using the EFK stack and Logging Kubernetes using Google Stackdriver recipes.
In this section, we will learn how to access basic logs based on the options that are available in Kubernetes.
Getting ready
Clone the k8sdevopscookbook/src repository to your workstation to use the manifest files in the chapter10 directory, as follows:
$ git clone https://github.com/k8sdevopscookbook/src.git
$ cd src/chapter10
Make sure you have a Kubernetes cluster ready and kubectl and helm configured to manage the cluster resources.
How to do it…
This section is further divided into the following subsections to make this process easier:
- Accessing...