kube

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Oct 28, 2022 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateTemporaryKubeconfig

func GenerateTemporaryKubeconfig(context string) (string, error)

Generate a temporary kubeconfig file

func GetClientSet added in v0.0.2

func GetClientSet(kubeconfigPath string) (*kubernetes.Clientset, error)

Create a new Clientset

func GetRawAPIConfig added in v0.0.2

func GetRawAPIConfig(kubeconfigPath string) (*api.Config, error)

Create a Rawconfig

func OutputPods added in v0.0.2

func OutputPods(podList []PodInfo, header []string)

Print pod list as table

func PodList

func PodList(cfg Config, wg *sync.WaitGroup, podlist *[]PodInfo)

List all pods on a given namespace

func PodLogs

func PodLogs(cancelCtx context.Context, cfg Config, wg *sync.WaitGroup)

Read pod logs Credits: https://github.com/nwaizer/GetPodLogsEfficiently

Types

type Config

type Config struct {
	ID          int
	KubeContext string
	Namespace   string
	PodName     string
	Follow      bool
	TailLines   int64
}

type PodInfo

type PodInfo struct {
	ContextID       int
	Cluster         string
	Namespace       string
	Podname         string
	PodGenerateName string
	PodID           int
	Phase           string
	Age             string
}

Jump to

Keyboard shortcuts

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