Version: v0.4.1 Latest Latest

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

Go to latest
Published: Sep 2, 2021 License: Apache-2.0 Imports: 14 Imported by: 0




This section is empty.


This section is empty.


func ExecAndHandleError

func ExecAndHandleError(req *rest.Request, fn func([]byte))

ExecAndHandleError executes the request req and handles error

func GetClient

func GetClient(cfg *Configs) (*rest.RESTClient, string, error)

GetClient loads kube config and returns a kubernetes rest client

func LoadKubeConfig

func LoadKubeConfig(cfg *Configs) (*rest.Config, string, error)

LoadKubeConfig parses kube config files


type Command

type Command interface {
	AddToCommand(command *cobra.Command)

Command is a cobra wrapper for cli

type Configs

type Configs struct {
	KubeConfig string

	CAFile   string
	CertFile string
	KeyFile  string

	BearerToken  string
	Username     string
	Password     string
	AuthInfoName string
	Namespace    string

	ClusterName string
	Context     string
	APIServer   string

	Insecure bool

Configs is configs struct for accessing k8s api server

func (*Configs) AddFlags

func (c *Configs) AddFlags(f *pflag.FlagSet)

AddFlags adds flags to a command line. Flags are sampled from kubectl's flags

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL