kubectl

package
v1.17.0-beta17 Latest Latest
Warning

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

Go to latest
Published: Apr 9, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cli

type Cli struct {
	// contains filtered or unexported fields
}

Cli is a utility for executing `kubectl` commands

func NewCli

func NewCli() *Cli

NewCli returns an implementation of the kubectl.Cli

func (*Cli) Apply

func (c *Cli) Apply(ctx context.Context, content []byte, extraArgs ...string) error

func (*Cli) ApplyCmd

func (c *Cli) ApplyCmd(ctx context.Context, content []byte, extraArgs ...string) cmdutils.Cmd

func (*Cli) Command

func (c *Cli) Command(ctx context.Context, args ...string) cmdutils.Cmd

func (*Cli) Copy

func (c *Cli) Copy(ctx context.Context, from, to string) error

func (*Cli) Delete

func (c *Cli) Delete(ctx context.Context, content []byte, extraArgs ...string) error

func (*Cli) RunCommand

func (c *Cli) RunCommand(ctx context.Context, args ...string) error

func (*Cli) StartPortForward

func (c *Cli) StartPortForward(ctx context.Context, options ...portforward.Option) (portforward.PortForwarder, error)

func (*Cli) WithKubeContext

func (c *Cli) WithKubeContext(kubeContext string) *Cli

WithKubeContext sets the --context for the kubectl command invoked by the Cli

func (*Cli) WithReceiver

func (c *Cli) WithReceiver(receiver io.Writer) *Cli

WithReceiver sets the io.Writer that will be used by default for the stdout and stderr of cmdutils.Cmd created by the Cli

Jump to

Keyboard shortcuts

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