# README
kubectl ephemeral-containers
A kubectl
plugin for directly modifying Pods' ephemeralContainers
spec.
An ephemeral container is a temporary container that is injected into existing Pods for some user-initiated actions, for example, troubleshooting. However, ephemeral container specs must be handled as a Pod's ephemeralcontainers
subresource. Consequently, kubectl edit
cannot be used for modifying pod.spec.ephemeralcontainers
.
This project is a plugin (i.e. an extension) to kubectl
that allows such direct editing, bringing back the experience of kubectl edit
. For more information on how to extend kubectl
, see guides.
Requirements
Installation
From released binaries
Download the binary from the release page and copy it to a directory on PATH
.
From source
In addition to released binaries, you can install the plugin from source.
With go install
go install github.com/k8s-crafts/ephemeral-containers-plugin@latest
Note: The binary will be installed under GOBIN
(i.e. go env GOBIN
) as ephemeral-containers-plugin
. It must be renamed to kubectl-ephemeral_containers
to register the plugin with kubectl
.
With source repository
git clone [email protected]:k8s-crafts/ephemeral-containers-plugin.git
cd ephemeral-containers-plugin
# Build the plugin and install it on PATH
# Default to $HOME/bin
make build install
User Guides
For details on how to use the plugin, see User Guides.
Contributing
For details on how to contribute, see Contributing Guides and Developer Guides.
License
The project follows MIT License. Feel free to use, experiment and distribute the project as per terms in the license!