Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/alexei-led/nsenter
Slim nsenter Docker image - enter into Docker container/host namespaces
https://github.com/alexei-led/nsenter
docker kubernetes namespaces nsenter
Last synced: about 2 months ago
JSON representation
Slim nsenter Docker image - enter into Docker container/host namespaces
- Host: GitHub
- URL: https://github.com/alexei-led/nsenter
- Owner: alexei-led
- License: gpl-2.0
- Created: 2019-07-25T08:40:00.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2023-09-05T13:03:46.000Z (about 1 year ago)
- Last Synced: 2024-02-14T21:59:45.718Z (7 months ago)
- Topics: docker, kubernetes, namespaces, nsenter
- Language: Shell
- Size: 16.6 KB
- Stars: 122
- Watchers: 4
- Forks: 38
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
![DockerHub](https://github.com/alexei-led/nsenter/workflows/DockerHub/badge.svg) ![Docker Pulls](https://img.shields.io/docker/pulls/alexeiled/nsenter.svg?style=popout) [![](https://images.microbadger.com/badges/image/alexeiled/nsenter.svg)](https://microbadger.com/images/alexeiled/nsenter "Get your own image badge on microbadger.com")
# nsenter
## Info
`alexeiled/nsenter` Docker image is a `scratch` image that contains only one statically linked `nsenter` file.
## Usage
Read the official `nsenter` [documentation](http://man7.org/linux/man-pages/man1/nsenter.1.html).
## Continuously Updated with GitHub Actions
The `nsenter` is automatically updated when a new version of [util-linux](https://github.com/util-linux/util-linux) is released.
## How do I *use* `alexeiled/nsenter`?
Enter the container:
```sh
# enter all namespaces of selected container
docker run -it --rm --privileged --pid=container: alexeiled/nsenter --all --target 1 -- su -
```Enter the Docker host:
```sh
# 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.
```sh
# list Kubernetes nodes
kubectl get nodesNAME STATUS ROLES AGE VERSION
ip-192-168-151-104.us-west-2.compute.internal Ready 6d17h v1.13.7-eks-c57ff8
ip-192-168-171-140.us-west-2.compute.internal Ready 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 ~]#
```