Skip to content

A kubectl plugin to interactively update Pod /ephemeralcontainers subresource

License

Notifications You must be signed in to change notification settings

k8s-crafts/ephemeral-containers-plugin

Repository files navigation

kubectl ephemeral-containers

Release Go version Lint Test

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 git@github.com: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 Apache License 2.0 license.