ssh

package
v0.0.0-...-85cb655 Latest Latest
Warning

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

Go to latest
Published: Apr 1, 2024 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrNoPreferredAddress is returned when a node has no preferred address.
	ErrNoPreferredAddress = errors.New("node has no preferred address")
	// ErrNoRoutableAddress is returned when a node has preferred addresses, but none of them routable.
	ErrNoRoutableAddress = errors.New("node has no routable address")
)

Functions

func NewCommand

func NewCommand(s genopts.IOStreams) *cobra.Command

NewCommand initializes an instance of the ssh command.

Types

type Config

type Config struct {
	Login        string
	NodeName     string
	NodeSelector labels.Selector

	genopts.IOStreams
	// contains filtered or unexported fields
}

Config holds configuration for kubectl-ssh.

func (*Config) AddFlags

func (c *Config) AddFlags(flagset *pflag.FlagSet)

AddFlags decorates the flagset with config flags.

func (*Config) Clientset

func (c *Config) Clientset() (*kubernetes.Clientset, error)

Clientset creates a new client based on the REST client configuration inferred from the environment or set through flags.

func (*Config) Complete

func (c *Config) Complete(cmd *cobra.Command, args []string) error

Complete sets config fields based on flags and arguments

func (*Config) Validate

func (c *Config) Validate() error

Validate checks that required arguments and flags are provided

Jump to

Keyboard shortcuts

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