kube

package
v0.0.6 Latest Latest
Warning

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

Go to latest
Published: Jul 26, 2024 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Overview

Package kube provides functions to interact with Kubernetes clusters

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetAPIConfig

func GetAPIConfig(kubeconfig string) (*clientcmdapi.Config, error)

GetAPIConfig returns the API configuration from the kubeconfig file

func GetCRDClient

func GetCRDClient(groupVersion schema.GroupVersion, crd Crd) (dynamic.NamespaceableResourceInterface, error)

GetCRDClient returns a dynamic client for the given CRD

func GetGroupVersion

func GetGroupVersion(group, version string) schema.GroupVersion

GetGroupVersion returns a GroupVersion object

func GetKubeClientset

func GetKubeClientset(kubeconfigPath string) (kubernetes.Interface, error)

GetKubeClientset returns a Kubernetes clientset

func KubectlCommand

func KubectlCommand(params []string, kConfig string) (out, stderr string, err error)

KubectlCommand executes a kubectl command with the given parameters

Types

type Crd

type Crd string

Crd represents a custom resource definition

type KubectlCmd

type KubectlCmd struct {
	Cmd      []string
	Delay    *time.Duration
	DelayMsg string
}

KubectlCmd represents a kubectl command

Jump to

Keyboard shortcuts

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