# kvaps/kubectl-node-shell

**Attribution required: if you use, quote, or summarise this content, you must credit and link back to [awesome-repositories.com](https://awesome-repositories.com/repository/kvaps-kubectl-node-shell).**

1,818 stars · 195 forks · Shell · Apache-2.0

## Links

- GitHub: https://github.com/kvaps/kubectl-node-shell
- awesome-repositories: https://awesome-repositories.com/repository/kvaps-kubectl-node-shell.md

## Topics

`kubectl` `kubectl-enter` `kubectl-node-shell` `kubectl-plugin` `kubectl-plugins` `kubernetes` `nsenter`

## Description

This project is a command-line plugin for Kubernetes that provides direct root shell access to the underlying host operating system of a cluster node. It is designed to facilitate administrative tasks, system maintenance, and diagnostic operations on nodes, including those running immutable or container-optimized operating systems that lack native shell environments.

The tool functions by dynamically scheduling ephemeral, privileged pods that share the host's process, network, and filesystem namespaces. By leveraging node affinity constraints, it ensures that these diagnostic sessions are executed on the specific target host, allowing users to interact with the node's root directory and system processes as if they were logged in locally.

Beyond interactive shell sessions, the utility supports remote command execution for automating configuration changes or retrieving diagnostic data across the cluster. It also provides capabilities for attaching persistent storage volumes to these temporary environments, enabling data recovery and the transfer of information between local node devices and external storage systems.

## Tags

### Development Tools & Productivity

- [Kubernetes Node Debugging](https://awesome-repositories.com/f/development-tools-productivity/application-debugging/remote-debugging/kubernetes-node-debugging.md) — Provides direct host-level access to troubleshoot hardware and system issues on Kubernetes nodes. ([source](https://github.com/kvaps/kubectl-node-shell#readme))

### Operating Systems & Systems Programming

- [Device Shell Access](https://awesome-repositories.com/f/operating-systems-systems-programming/device-shell-access.md) — Grants root-level shell access to the host operating system of a Kubernetes node for administrative and diagnostic tasks. ([source](https://github.com/kvaps/kubectl-node-shell#readme))

### DevOps & Infrastructure

- [Cluster Administration](https://awesome-repositories.com/f/devops-infrastructure/cluster-administration.md) — Facilitates cluster-wide administration by allowing remote command execution across node host environments.
- [Node Affinity Rules](https://awesome-repositories.com/f/devops-infrastructure/container-orchestration-configurations/node-affinity-rules.md) — Uses node affinity rules to ensure diagnostic pods are scheduled on the specific target host requiring maintenance.
- [Workload Scheduling](https://awesome-repositories.com/f/devops-infrastructure/control-planes/workload-scheduling.md) — Schedules ephemeral diagnostic pods onto specific cluster nodes to facilitate system-level maintenance tasks.
- [Infrastructure Debugging Utilities](https://awesome-repositories.com/f/devops-infrastructure/infrastructure-debugging-utilities.md) — Enables inspection and repair of immutable or container-optimized operating systems by launching temporary diagnostic environments.
- [Kubernetes Cluster Management](https://awesome-repositories.com/f/devops-infrastructure/kubernetes-cluster-management.md) — Acts as a maintenance utility for managing node infrastructure and executing administrative tasks within a cluster.
- [Root Filesystem Mounting](https://awesome-repositories.com/f/devops-infrastructure/layered-filesystems/host-to-layer-mounting/root-filesystem-mounting.md) — Mounts the host root filesystem into a container to enable direct inspection and modification of system files.
- [Remote Command Execution](https://awesome-repositories.com/f/devops-infrastructure/remote-command-execution.md) — Executes remote commands and scripts on host nodes to automate configuration changes and retrieve diagnostic data. ([source](https://github.com/kvaps/kubectl-node-shell/blob/master/README.md))

### Networking & Communication

- [Namespace-Based Resource Sharings](https://awesome-repositories.com/f/networking-communication/communication-protocols-architectures/communication-paradigms/namespaces/network-namespace-sharing/namespace-based-resource-sharings.md) — Joins host process and network namespaces to allow diagnostic tools to interact directly with the underlying node environment.
- [Ephemeral Sidecar Injections](https://awesome-repositories.com/f/networking-communication/proxy-installers/sidecar-injection/ephemeral-sidecar-injections.md) — Injects privileged ephemeral sidecar containers into the node environment to bypass OS limitations for diagnostic access.

### System Administration & Monitoring

- [Troubleshooting Utilities](https://awesome-repositories.com/f/system-administration-monitoring/troubleshooting-utilities.md) — Offers diagnostic capabilities for inspecting and repairing nodes that lack native shell environments.
