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...