cluster

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Jun 26, 2019 License: Apache-2.0 Imports: 9 Imported by: 116

Documentation

Overview

Package cluster implements kind kubernetes-in-docker cluster management

Index

Constants

DefaultName is the default cluster name

Variables

This section is empty.

Functions

func IsKnown added in v0.2.0

func IsKnown(name string) (bool, error)

IsKnown return true if a cluster exists with the given name. If obtaining the list of known clusters fails the function returns an error.

Types

type Context

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

Context is used to create / manipulate kubernetes-in-docker clusters See: NewContext()

func List

func List() ([]Context, error)

List returns a list of clusters for which node containers exist

func NewContext

func NewContext(name string) *Context

NewContext returns a new cluster management context if name is "" the default name will be used (constants.DefaultClusterName)

func (*Context) CollectLogs

func (c *Context) CollectLogs(dir string) error

CollectLogs will populate dir with cluster logs and other debug files

func (*Context) Create

func (c *Context) Create(cfg *config.Cluster, options ...create.ClusterOption) error

Create provisions and starts a kubernetes-in-docker cluster

func (*Context) Delete

func (c *Context) Delete() error

Delete tears down a kubernetes-in-docker cluster

func (*Context) KubeConfigPath

func (c *Context) KubeConfigPath() string

KubeConfigPath returns the path to where the Kubeconfig would be placed by kind based on the configuration.

func (*Context) ListInternalNodes added in v0.4.0

func (c *Context) ListInternalNodes() ([]nodes.Node, error)

ListInternalNodes returns the list of container IDs for the "nodes" in the cluster that are not external

func (*Context) ListNodes

func (c *Context) ListNodes() ([]nodes.Node, error)

ListNodes returns the list of container IDs for the "nodes" in the cluster

func (*Context) Name

func (c *Context) Name() string

Name returns context name / cluster name

func (*Context) Validate

func (c *Context) Validate() error

Validate will be called before creating new resources using the context It will not be called before deleting or listing resources, so as to allow contexts based around previously valid values to be used in newer versions You can call this early yourself to check validation before creation calls, though it will be called internally.

Directories

Path Synopsis
Package config implements the current apiVersion of the `kind` Config along with some common abstractions +k8s:deepcopy-gen=package +k8s:conversion-gen=sigs.k8s.io/kind/pkg/cluster/config +k8s:defaulter-gen=TypeMeta
Package config implements the current apiVersion of the `kind` Config along with some common abstractions +k8s:deepcopy-gen=package +k8s:conversion-gen=sigs.k8s.io/kind/pkg/cluster/config +k8s:defaulter-gen=TypeMeta
defaults
Package defaults contains cross-api-version configuration defaults
Package defaults contains cross-api-version configuration defaults
encoding
Package encoding implements utilities for decoding from yaml the `kind` Config
Package encoding implements utilities for decoding from yaml the `kind` Config
v1alpha3
Package v1alpha3 implements the v1alpha3 apiVersion of kind's cluster configuration +k8s:deepcopy-gen=package +k8s:conversion-gen=sigs.k8s.io/kind/pkg/cluster/config +k8s:defaulter-gen=TypeMeta
Package v1alpha3 implements the v1alpha3 apiVersion of kind's cluster configuration +k8s:deepcopy-gen=package +k8s:conversion-gen=sigs.k8s.io/kind/pkg/cluster/config +k8s:defaulter-gen=TypeMeta
Package constants contains well known constants for kind clusters
Package constants contains well known constants for kind clusters
internal
context
Package context contains the internal cluster context shared by various packages that implement the user face pkg/cluster.Context
Package context contains the internal cluster context shared by various packages that implement the user face pkg/cluster.Context
create/actions/config
Package config implements the kubeadm config action
Package config implements the kubeadm config action
create/actions/installcni
Package installcni implements the install CNI action
Package installcni implements the install CNI action
create/actions/installstorage
Package installstorage implements the an action to isntall a default storageclass
Package installstorage implements the an action to isntall a default storageclass
create/actions/kubeadminit
Package kubeadminit implements the kubeadm init action
Package kubeadminit implements the kubeadm init action
create/actions/kubeadmjoin
Package kubeadmjoin implements the kubeadm join action
Package kubeadmjoin implements the kubeadm join action
create/actions/loadbalancer
Package loadbalancer implements the load balancer configuration action
Package loadbalancer implements the load balancer configuration action
create/actions/waitforready
Package waitforready implements the wait for ready action
Package waitforready implements the wait for ready action
kubeadm
Package kubeadm contains kubeadm related constants and configuration
Package kubeadm contains kubeadm related constants and configuration
loadbalancer
Package loadbalancer contains external loadbalancer related constants and configuration
Package loadbalancer contains external loadbalancer related constants and configuration
Package logs contains tooling for obtaining cluster logs
Package logs contains tooling for obtaining cluster logs
Package nodes contains functionality for Kubernetes-in-Docker nodes It mostly exists to break up functionality from sigs.k8s.io/kind/pkg/cluster
Package nodes contains functionality for Kubernetes-in-Docker nodes It mostly exists to break up functionality from sigs.k8s.io/kind/pkg/cluster

Jump to

Keyboard shortcuts

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