Peeking into Kubernetes containers

Thanks to Justin Garrison, I recently not only finally understand

but also

and peek around!

In brief:

  • locate the container's Docker name using docker ps (last entry, very long, probably starting with k8s_)
  • run a debugging container of your choice in the same PID namespace, e.g.:
docker run -it --pid=container:<container docker name> alpine sh
  • cd into /proc/1/root directory
  • explore!

For more details, read his Medium post.

Blogroll

Social