k8sutils

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Mar 20, 2018 License: Apache-2.0 Imports: 8 Imported by: 17

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrK8SApiAccountNotSet = errors.New("k8s api account is not setup")

ErrK8SApiAccountNotSet is returned when the account used to talk to k8s api is not setup

Functions

func DeletePod

func DeletePod(podName string, namespace string, force bool) error

DeletePod Deletes the pod by the name

func GetAllPods

func GetAllPods() (*v1.PodList, error)

GetAllPods Get all Pods in the cluster

func GetK8sClient

func GetK8sClient() (*kubernetes.Clientset, error)

GetK8sClient instantiates a k8s client

func GetPVC

func GetPVC(pvcName string, namespace string) (*v1.PersistentVolumeClaim, error)

GetPVC Gets the PVC by the name

func GetPod

func GetPod(podName string, namespace string) (*v1.Pod, error)

GetPod Gets the pod by the name

func GetService

func GetService(svcName string, svcNS string) (*v1.Service, error)

GetService Gets the service by the name

func GetStorageClass

func GetStorageClass(storageClassName string, namespace string) (*storagev1.StorageClass, error)

GetStorageClass Gets the storage class by name

func GetStorageClassName

func GetStorageClassName(pvc *v1.PersistentVolumeClaim) string

GetStorageClassName Gets the storage class name for a PVC

Types

This section is empty.

Jump to

Keyboard shortcuts

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