gke

package
v0.0.0-...-8927fdd Latest Latest
Warning

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

Go to latest
Published: Mar 17, 2017 License: BSD-3-Clause Imports: 12 Imported by: 0

Documentation

Overview

Package gke contains code for interacting with Google Container Engine (GKE), the hosted version of Kubernetes on Google Cloud Platform.

The API is not subject to the Go 1 compatibility promise and may change at any time. Users should vendor this package and deal with API changes.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewClient

func NewClient(ctx context.Context, clusterName string, opts ...ClientOpt) (*kubernetes.Client, error)

NewClient returns an Kubernetes client to a GKE cluster.

Types

type ClientOpt

type ClientOpt interface {
	// contains filtered or unexported methods
}

ClientOpt represents an option that can be passed to the Client function.

func OptProject

func OptProject(projectName string) ClientOpt

OptProject returns an option setting the GCE Project ID to projectName. This is the named project ID, not the numeric ID. If unspecified, the current active project ID is used, if the program is running on a GCE intance.

func OptTokenSource

func OptTokenSource(ts oauth2.TokenSource) ClientOpt

OptTokenSource sets the oauth2 token source for making authenticated requests to the GKE API. If unset, the default token source is used (https://godoc.org/golang.org/x/oauth2/google#DefaultTokenSource).

func OptZone

func OptZone(zoneName string) ClientOpt

OptZone specifies the GCP zone the cluster is located in. This is necessary if and only if there are multiple GKE clusters with the same name in different zones.

Jump to

Keyboard shortcuts

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