<p>im looking for the OS version(such as Ubuntu 20.04.1 LTS) to get it from container that run on kuberentes server. i mean, i need to OS of the server which on that server i have kubernetes with number of pods(and containers).
i saw there is a library which call &quot;kubernetes&quot; but didn't found any relevant info on this specific subject.
is there a way to get this info with python?
many thanks for the help!</p>

twome
<p>If you need to get an OS version of running container you should read</p>
<p><a href="https://kubernetes.io/docs/tasks/debug/debug-application/get-shell-running-container/" rel="nofollow noreferrer">https://kubernetes.io/docs/tasks/debug/debug-application/get-shell-running-container/</a></p>
<p>as it described above you can get access to your running pod by command:</p>
<p>kubectl exec --stdin --tty &lt;pod_name&gt; -- /bin/bash</p>
<p>then just type &quot;cat /etc/os-release&quot; and you will see the OS info which your pod running on. In most cases containers run on unix systems and you will find current pod OS.</p>
<p>You also can install python or anything else inside your pod. But I do not recommend to do it. Containers have minimum thing to make you app work. For checking it is ok, but after it just deploy new container.</p>
