kubectl

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: Mar 17, 2021 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NamespacesList

func NamespacesList() []string

NamespacesList returns the list of k8s namespaces

func PortForward

func PortForward(podID string, localPort int, remotePort int, namespace string)

PortForward executes kubectl's 'port-forward'. Local port is bound to 0.0.0.0. via '--address'.

func SetKubectlPath

func SetKubectlPath(path string)

SetKubectlPath sets the executable path to kubectl bin.

Types

type Pod

type Pod struct {
	Name           string
	Containers     []string
	ContainerPorts []int
	AppLabel       string
}

Pod structure

func PodsList

func PodsList(namespace string) []*Pod

PodsList returns the list of k8s pods from the given namespace

Jump to

Keyboard shortcuts

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