Sign inSign up

alexeiled/nsenter

By alexeiled

Updated about 4 years ago

nsenter Docker image - from scratch

Image
3

500K+

alexeiled/nsenter repository overview

Docker Pulls

nsenter

Info

alexeiled/nsenter Docker image is a scratch image that contains only one statically linked nsenter file.

Usage

Read the official nsenter documentation.

How do I use alexeiled/nsenter?

Enter the container:

# enter all namespaces of selected container
docker run -it --rm --privileged --pid=container:<container_name_or_ID> alexeiled/nsenter --all --target 1 -- su -

Enter the Docker host:

# enter all namespaces of Docker host
docker run -it --rm --privileged --pid=host alexeiled/nsenter --all --target 1 -- su -

Enter Kubernetes node

Use helper script nsenter-node.sh to enter into any Kubernetes node by creating a new pod tolerated to the specified node.

# list Kubernetes nodes
kubectl get nodes

NAME                                            STATUS   ROLES    AGE     VERSION
ip-192-168-151-104.us-west-2.compute.internal   Ready    <none>   6d17h   v1.13.7-eks-c57ff8
ip-192-168-171-140.us-west-2.compute.internal   Ready    <none>   5d10h   v1.13.7-eks-c57ff8

# enter into selected node with default shell as superuser
./nsenter-node.sh ip-192-168-151-104.us-west-2.compute.internal

[root@ip-192-168-171-140 ~]#

Tag summary

Content type

Image

Digest

sha256:965b8062b

Size

373.9 kB

Last updated

about 4 years ago

docker pull alexeiled/nsenter