k8s

package
v0.0.0-...-2e9f0d3 Latest Latest
Warning

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

Go to latest
Published: Jan 16, 2018 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package k8s provides a PodLister and PodDeleter that talks to a real Kubernetes

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

Client is a wrapper around a Kubernetes cluster

func New

func New(kubeconfig string, context string) (*Client, error)

New creates and returns a new client. If kubeconfig is not define, then an in-cluster client is created. context is only used if kubeconfig is specified and sets the k8s context - if blank, current context from the config file is used.

func (*Client) DeletePod

func (c *Client) DeletePod(namespace string, name string) error

DeletePod attempts to delete a single pod

func (*Client) ListPods

func (c *Client) ListPods(namespace string, selector string) ([]v1.Pod, error)

ListPods will return a list of Pods in a namespace, optionally using a label selector. Empty namespace means all namespaces

Jump to

Keyboard shortcuts

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