cluster

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Nov 29, 2018 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Overview

Package cluster implements kind kubernetes-in-docker cluster management

Index

Constants

View Source
const DefaultName = "1"

DefaultName is the default Context name TODO(bentheelder): consider removing automatic prefixing in favor of letting the user specify the full name..

Variables

This section is empty.

Functions

This section is empty.

Types

type Context

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

Context is used to create / manipulate kubernetes-in-docker clusters

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 ("1") will be used

func (*Context) ClusterLabel

func (c *Context) ClusterLabel() string

ClusterLabel returns the docker object label that will be applied to cluster "node" containers

func (*Context) ClusterName

func (c *Context) ClusterName() string

ClusterName returns the Kubernetes cluster name based on the context name currently this is .Name prefixed with "kind-"

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.Config, retain bool) 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) 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 the context's 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
encoding
Package encoding implements utilities for decoding from yaml the `kind` Config
Package encoding implements utilities for decoding from yaml the `kind` Config
v1alpha1
Package v1alpha1 implements the v1alpha1 apiVersion of the `kind` Config +k8s:deepcopy-gen=package +k8s:conversion-gen=sigs.k8s.io/kind/pkg/cluster/config/ +k8s:defaulter-gen=TypeMeta
Package v1alpha1 implements the v1alpha1 apiVersion of the `kind` Config +k8s:deepcopy-gen=package +k8s:conversion-gen=sigs.k8s.io/kind/pkg/cluster/config/ +k8s:defaulter-gen=TypeMeta
Package consts contains well known constants for kind clusters
Package consts contains well known constants for kind clusters
Package kubeadm contains kubeadm related constants and configuration
Package kubeadm contains kubeadm 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