Is there a Kubectl
command to figure out the following info about a Pod
?
The installed Linux distribution
The OS version
Let's say you don't really have a good deal of info about the image with which a Deployment
or a Pod
has been created...
Something as simple as this using exec will result the os details
$ kubectl exec -it nginx1 -- /bin/bash -c "cat /etc/os-release;uname -r"
Should result this
PRETTY_NAME="Debian GNU/Linux 10 (buster)"
NAME="Debian GNU/Linux"
VERSION_ID="10"
VERSION="10 (buster)"
VERSION_CODENAME=buster
ID=debian
HOME_URL="https://www.debian.org/"
SUPPORT_URL="https://www.debian.org/support"
BUG_REPORT_URL="https://bugs.debian.org/"
4.4.0-169-generic