tool

package
v0.0.0-...-d41404b Latest Latest
Warning

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

Go to latest
Published: Jan 16, 2020 License: GPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type K8sClient

type K8sClient struct {
	// kubernetes.Interface should be used instead of kubernets.Inteface for unit test (mocking)
	ClientSet kubernetes.Interface
	Config    *rest.Config
}

K8sClient is a struct which contains the kubernetes.Interface and *rest.Config.

func NewK8sClient

func NewK8sClient() (*K8sClient, error)

NewK8sClient is to generate a K8s client for interacting with the K8S cluster.

func (*K8sClient) Exec

func (client *K8sClient) Exec(namespace, podName, containerName string, command []string, stdin io.Reader) (*bytes.Buffer, *bytes.Buffer, error)

Exec enables operator to execute command in the pod's container in the K8S cluster. It returns the standard output and the standard error output.

Jump to

Keyboard shortcuts

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