kind: sigs.k8s.io/kind/pkg/cluster Index | Files | Directories

package cluster

import "sigs.k8s.io/kind/pkg/cluster"

Package cluster implements kind kubernetes-in-docker cluster management

Index

Package Files

createoption.go doc.go provider.go

Constants

const DefaultName = constants.DefaultClusterName

DefaultName is the default cluster name

type CreateOption Uses

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

CreateOption is a Provider.Create option

func CreateWithConfigFile Uses

func CreateWithConfigFile(path string) CreateOption

CreateWithConfigFile configures the config file path to use

func CreateWithDisplaySalutation Uses

func CreateWithDisplaySalutation(displaySalutation bool) CreateOption

CreateWithDisplaySalutation enables display a salutation t the end of create cluster if displaySalutation is true

func CreateWithDisplayUsage Uses

func CreateWithDisplayUsage(displayUsage bool) CreateOption

CreateWithDisplayUsage enables displaying usage if displayUsage is true

func CreateWithKubeconfigPath Uses

func CreateWithKubeconfigPath(explicitPath string) CreateOption

CreateWithKubeconfigPath sets the explicit --kubeconfig path

func CreateWithNodeImage Uses

func CreateWithNodeImage(nodeImage string) CreateOption

CreateWithNodeImage overrides the image on all nodes in config as an easy way to change the Kubernetes version

func CreateWithRawConfig Uses

func CreateWithRawConfig(raw []byte) CreateOption

CreateWithRawConfig configures the config to use from raw (yaml) bytes

func CreateWithRetain Uses

func CreateWithRetain(retain bool) CreateOption

CreateWithRetain disables deletion of nodes and any other cleanup that would normally occur after a failure to create This is mainly used for debugging purposes

func CreateWithStopBeforeSettingUpKubernetes Uses

func CreateWithStopBeforeSettingUpKubernetes(stopBeforeSettingUpKubernetes bool) CreateOption

CreateWithStopBeforeSettingUpKubernetes enables skipping setting up kubernetes (kubeadm init etc.) after creating node containers This generally shouldn't be used and is only lightly supported, but allows provisioning node containers for experimentation

func CreateWithV1Alpha3Config Uses

func CreateWithV1Alpha3Config(config *v1alpha3.Cluster) CreateOption

CreateWithV1Alpha3Config configures the cluster with a v1alpha3 config

func CreateWithWaitForReady Uses

func CreateWithWaitForReady(waitTime time.Duration) CreateOption

CreateWithWaitForReady configures a maximum wait time for the control plane node(s) to be ready. By defeault no waiting is performed

type Provider Uses

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

Provider is used to perform cluster operations

func NewProvider Uses

func NewProvider(options ...ProviderOption) *Provider

NewProvider returns a new provider based on the supplied options

func (*Provider) CollectLogs Uses

func (p *Provider) CollectLogs(name, dir string) error

CollectLogs will populate dir with cluster logs and other debug files

func (*Provider) Create Uses

func (p *Provider) Create(name string, options ...CreateOption) error

Create provisions and starts a kubernetes-in-docker cluster

func (*Provider) Delete Uses

func (p *Provider) Delete(name, explicitKubeconfigPath string) error

Delete tears down a kubernetes-in-docker cluster

func (*Provider) ExportKubeConfig Uses

func (p *Provider) ExportKubeConfig(name string, explicitPath string) error

ExportKubeConfig exports the KUBECONFIG for the cluster, merging it into the selected file, following the rules from https://kubernetes.io/docs/reference/generated/kubectl/kubectl-commands#config where explicitPath is the --kubeconfig value.

func (*Provider) KubeConfig Uses

func (p *Provider) KubeConfig(name string, internal bool) (string, error)

KubeConfig returns the KUBECONFIG for the cluster If internal is true, this will contain the internal IP etc. If internal is fale, this will contain the host IP etc.

func (*Provider) List Uses

func (p *Provider) List() ([]string, error)

List returns a list of clusters for which nodes exist

func (*Provider) ListInternalNodes Uses

func (p *Provider) ListInternalNodes(name string) ([]nodes.Node, error)

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

func (*Provider) ListNodes Uses

func (p *Provider) ListNodes(name string) ([]nodes.Node, error)

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

type ProviderOption Uses

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

ProviderOption is an option for configuring a provider

func ProviderWithLogger Uses

func ProviderWithLogger(logger log.Logger) ProviderOption

ProviderWithLogger configures the provider to use Logger logger

Directories

PathSynopsis
constantsPackage constants contains well known constants for kind clusters
create
nodesPackage nodes provides a kind specific definition of a cluster node
nodeutilsPackage nodeutils contains functionality for Kubernetes-in-Docker nodes It mostly exists to break up functionality from sigs.k8s.io/kind/pkg/cluster

Package cluster imports 14 packages (graph) and is imported by 19 packages. Updated 2019-11-12. Refresh now. Tools for package owners.