shell

package
v0.0.21 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 13, 2024 License: MIT Imports: 13 Imported by: 0

README

retina-shell

Retina CLI provides a command to launch an interactive shell in a node or pod for adhoc debugging.

  • The CLI command kubectl retina shell creates a pod with HostNetwork=true (for node debugging) or an ephemeral container in an existing pod (for pod debugging).
  • The container runs an image built from the Dockerfile in this directory. The image is based on Azure Linux and includes commonly-used networking tools.

For testing, you can override the image used by retina shell either with CLI arguments (--retina-shell-image-repo and --retina-shell-image-version) or environment variables (RETINA_SHELL_IMAGE_REPO and RETINA_SHELL_IMAGE_VERSION).

Run kubectl retina shell -h for full documentation and examples.

Currently only Linux is supported; Windows support will be added in the future.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RunInNode

func RunInNode(config Config, nodeName, debugPodNamespace string) error

RunInNode starts an interactive shell on a node by creating a HostNetwork pod and attaching to it.

func RunInPod

func RunInPod(config Config, podNamespace, podName string) error

RunInPod starts an interactive shell in a pod by creating and attaching to an ephemeral container.

Types

type Config

type Config struct {
	RestConfig       *rest.Config
	RetinaShellImage string
	HostPID          bool
	Capabilities     []string
	Timeout          time.Duration

	// Host filesystem access applies only to nodes, not pods.
	MountHostFilesystem      bool
	AllowHostFilesystemWrite bool
}

Config is the configuration for starting a shell in a node or pod.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL