What is the way to figure out what is the container runtime? Is it Kube/docker/podman etc?
Earlier there were ways to figure out like reading the content of "/run/systemd/container" file or by getting the env variable "container".
Looks like there were some changes done to docker & podman. Now the above methods no longer are telling us what is the container runtime.
Is there a way to determine the container runtime during container initialization itself?
2
Answers
you can use this command to see what is your container runtime
kubectl get nodes -o wide
for more information you can check this link
https://kubernetes.io/docs/tasks/administer-cluster/migrating-from-dockershim/find-out-runtime-you-use/
Try to read the
.HostConfig.Runtime
value inside thedocker inspect
output:If you want to do it on every container you have, type the command: