kubernetes

package
v0.0.0-...-0369387 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2024 License: Zlib Imports: 13 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateSnapshot

func CreateSnapshot() (*portainer.KubernetesSnapshot, error)

CreateSnapshot creates a snapshot of a specific Kubernetes environment(endpoint)

Types

type KubeClient

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

KubeClient can be used to query the Kubernetes API

func NewKubeClient

func NewKubeClient() (*KubeClient, error)

NewKubeClient returns a pointer to a new KubeClient instance

func (*KubeClient) StartExecProcess

func (kcl *KubeClient) StartExecProcess(token, namespace, podName, containerName string, command []string, stdin io.Reader, stdout io.Writer) error

StartExecProcess will start an exec process inside a container located inside a pod inside a specific namespace using the specified command. The stdin parameter will be bound to the stdin process and the stdout process will write to the stdout parameter. This function only works against a local endpoint using an in-cluster config.

Jump to

Keyboard shortcuts

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