<p>I've a python application in which I'm using <code>print()</code> method tho show text to a user.  When I interact with this application manually using <code>kubectl exec ...</code> command I can see the output of prints. </p>

<p>However, when script is executed automatically on container startup with <code>CMD python3 /src/my_app.py</code> (last entry in <code>Dockerfile</code>) then, the prints are gone (not shown in <code>kubectl logs</code>). Ayn suggestin on how to fix it?</p>

<p>It turned out to be a problem of python environment. Setting, these two environment variables <code>PYTHONUNBUFFERED=1</code> and <code>PYTHONIOENCODING=UTF-8</code> fixed the issue.</p>
