kubernetesk8s.io/kubernetes/pkg/util/nsenter Index | Files

package nsenter

import "k8s.io/kubernetes/pkg/util/nsenter"

Index

Constants

const (
	// DefaultHostRootFsPath is path to host's filesystem mounted into container
	// with kubelet.
	DefaultHostRootFsPath = "/rootfs"
)

Types

type Nsenter

type Nsenter struct {
	// a map of commands to their paths on the host filesystem
	Paths map[string]string
}

Nsenter is part of experimental support for running the kubelet in a container.

func NewNsenter

func NewNsenter(hostRootFsPath string, executor exec.Interface) (*Nsenter, error)

NewNsenter constructs a new instance of Nsenter

func (*Nsenter) AbsHostPath

func (ne *Nsenter) AbsHostPath(command string) string

AbsHostPath returns the absolute runnable path for a specified command

func (*Nsenter) Exec

func (ne *Nsenter) Exec(cmd string, args []string) exec.Cmd

Exec executes nsenter commands in hostProcMountNsPath mount namespace

func (*Nsenter) SupportsSystemd

func (ne *Nsenter) SupportsSystemd() (string, bool)

SupportsSystemd checks whether command systemd-run exists

Source Files

nsenter_unsupported.go

Version
v1.11.0-beta.2
Published
Jun 7, 2018
Platform
js/wasm
Imports
1 packages
Last checked
2 minutes ago

Tools for package owners.