Reader small image

You're reading from  Kubernetes for Developers

Product typeBook
Published inApr 2018
Reading LevelIntermediate
PublisherPackt
ISBN-139781788834759
Edition1st Edition
Languages
Right arrow
Author (1)
Joseph Heck
Joseph Heck
author image
Joseph Heck

Joseph Heck has broad development and management experience across start-ups and large companies. He has architected, developed, and deployed a wide variety of solutions, ranging from mobile and desktop applications to cloud-based distributed systems. He builds and directs teams and mentors individuals to improve the way they build, validate, deploy, and run software. He also works extensively with and in open source, collaborating across many projects, including Kubernetes.
Read more about Joseph Heck

Right arrow

Logs


The most common method of getting information about how your code is working is generally through logs. Every language and development environment has its own pattern of how to expose those details, but at the very basics, it can be as simple as a print statement sending a line of text that will mean something to you to stdout. It is without a doubt the most consistent means across all programming languages of quick and simple debugging. When you deploy and run your code in Kubernetes, it maintains access to the logs from each Pod and container—where logs, in this case, are sending data to stdout and stderr.

If your existing pattern of development writes output to a specific file location, and maybe your framework includes the capability of rotating those log files as they grow, you may want to consider just sending data to stdout and/or stderr so that Kubernetes can make this coordination work.

Pods with more than one container

Our examples have been simple so far, with a single container...

lock icon
The rest of the page is locked
Previous PageNext Page
You have been reading a chapter from
Kubernetes for Developers
Published in: Apr 2018Publisher: PacktISBN-13: 9781788834759

Author (1)

author image
Joseph Heck

Joseph Heck has broad development and management experience across start-ups and large companies. He has architected, developed, and deployed a wide variety of solutions, ranging from mobile and desktop applications to cloud-based distributed systems. He builds and directs teams and mentors individuals to improve the way they build, validate, deploy, and run software. He also works extensively with and in open source, collaborating across many projects, including Kubernetes.
Read more about Joseph Heck