k8s

package
v0.0.0-...-05e7d12 Latest Latest
Warning

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

Go to latest
Published: May 14, 2018 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetDeployment

func GetDeployment(k8s *Client, ns, name string) (*appsv1.Deployment, error)

GetDeployment gets a Deployment object

func GetPodLogs

func GetPodLogs(k8s *Client, ns, name string, opts *PodLogOptions) (io.ReadCloser, error)

GetPodLogs gets logs of a pod

func GetReplicaSet

func GetReplicaSet(k8s *Client, ns, name string) (*appsv1.ReplicaSet, error)

GetReplicaSet gets a ReplicaSet object

func GetService

func GetService(k8s *Client, ns, name string) (*v1.Service, error)

GetService gets a Service object

func GetStatefulSet

func GetStatefulSet(k8s *Client, ns, name string) (*appsv1.StatefulSet, error)

GetStatefulSet gets a StatefulSet object

func ListPods

func ListPods(k8s *Client, ns string, selector *LabelSelector) ([]v1.Pod, error)

ListPods lists pods matching the label selector

func WatchPods

func WatchPods(k8s *Client, ns string, selector *LabelSelector, onAdd func(*v1.Pod), onUpdate func(*v1.Pod, *v1.Pod), onDelete func(*v1.Pod)) func()

WatchPods watches pods matching the label selector

Types

type Client

type Client = kubernetes.Clientset

Client is a kubernetes client

func NewClient

func NewClient(kubeconfig string) (*Client, error)

NewClient creates a new kubernetes client

It uses the current context in the kubeconfig file

type LabelSelector

type LabelSelector = metav1.LabelSelector

LabelSelector is an alias to kubernetes' LabelSelector

type Pod

type Pod = v1.Pod

Pod is an alias to kubernetes' Pod

type PodLogOptions

type PodLogOptions = v1.PodLogOptions

PodLogOptions is an alias to kubernetes' PodLogOptions

Jump to

Keyboard shortcuts

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