kubernetes

package
v0.0.0-...-cca8170 Latest Latest
Warning

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

Go to latest
Published: Sep 1, 2015 License: BSD-3-Clause Imports: 9 Imported by: 0

Documentation

Overview

Package kubernetes contains a minimal client for the Kubernetes API.

Index

Constants

View Source
const (
	// APIEndpoint defines the base path for kubernetes API resources.
	APIEndpoint = "/api/v1beta3"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

Client is a client for the Kubernetes master.

func NewClient

func NewClient(baseURL string, client *http.Client) (*Client, error)

NewClient returns a new Kubernetes client. The provided host is an url (scheme://hostname[:port]) of a Kubernetes master without any path. The provided client is an authorized http.Client used to perform requests to the Kubernetes API master.

func (*Client) Run

func (c *Client) Run(pod *api.Pod) (*api.PodStatus, error)

RunPod create a new pod resource in the default pod namespace with the given pod API specification. It returns the pod status once it is not pending anymore.

Jump to

Keyboard shortcuts

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