From the course: Certified Kubernetes Administrator (CKA) Cert Prep (2024)

Unlock this course with a free trial

Join today to access over 24,900 courses taught by industry experts.

Configuring application logging

Configuring application logging

- The next assignment is to create a solution for application logging. So create a pod with a logging agent that runs as a sidecar container. Configure the main application to use Busybox and run the Linux date command every minute. The result of this command should be written to the directory/output/date.log. Set up a sidecar container that runs Nginx and provides access to the date.log file on /usr/share/nginx/html/date.log. So here is how we can do that. I would advise using the documentation again. So logging is showing that there is something about logging architecture. Now it's a little bit of a long file, but the example that we need is right here. Here's a manifest for a pod that has two sidecar containers. Let me copy that and let me put it in lab135.yaml. You know, I like this approach where I start from a configuration that we found in the documentation and we are going to modify that. Now, the things to consider, first we need to create a pod with the logging agent that…

Contents