import "sigs.k8s.io/kind/pkg/cluster"
Package cluster implements kind kubernetes-in-docker cluster management
createoption.go doc.go provider.go
const DefaultName = constants.DefaultClusterName
DefaultName is the default cluster name
type CreateOption interface {
// contains filtered or unexported methods
}
CreateOption is a Provider.Create option
func CreateWithConfigFile(path string) CreateOption
CreateWithConfigFile configures the config file path to use
func CreateWithDisplaySalutation(displaySalutation bool) CreateOption
CreateWithDisplaySalutation enables display a salutation at the end of create cluster if displaySalutation is true
func CreateWithDisplayUsage(displayUsage bool) CreateOption
CreateWithDisplayUsage enables displaying usage if displayUsage is true
func CreateWithKubeconfigPath(explicitPath string) CreateOption
CreateWithKubeconfigPath sets the explicit --kubeconfig path
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(raw []byte) CreateOption
CreateWithRawConfig configures the config to use from raw (yaml) bytes
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(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 CreateWithV1Alpha4Config(config *v1alpha4.Cluster) CreateOption
CreateWithV1Alpha4Config configures the cluster with a v1alpha4 config
func CreateWithWaitForReady(waitTime time.Duration) CreateOption
CreateWithWaitForReady configures a maximum wait time for the control plane node(s) to be ready. By default no waiting is performed
type Provider struct {
// contains filtered or unexported fields
}
Provider is used to perform cluster operations
func NewProvider(options ...ProviderOption) *Provider
NewProvider returns a new provider based on the supplied options
CollectLogs will populate dir with cluster logs and other debug files
func (p *Provider) Create(name string, options ...CreateOption) error
Create provisions and starts a kubernetes-in-docker cluster TODO: move name to an option to override config
Delete tears down a kubernetes-in-docker cluster
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.
KubeConfig returns the KUBECONFIG for the cluster If internal is true, this will contain the internal IP etc. If internal is false, this will contain the host IP etc.
List returns a list of clusters for which nodes exist
ListInternalNodes returns the list of container IDs for the "nodes" in the cluster that are not external
ListNodes returns the list of container IDs for the "nodes" in the cluster
type ProviderOption interface {
// contains filtered or unexported methods
}
ProviderOption is an option for configuring a provider
func ProviderWithDocker() ProviderOption
ProviderWithDocker configures the provider to use docker runtime
func ProviderWithLogger(logger log.Logger) ProviderOption
ProviderWithLogger configures the provider to use Logger logger
func ProviderWithPodman() ProviderOption
ProviderWithPodman configures the provider to use podman runtime
Path | Synopsis |
---|---|
constants | Package constants contains well known constants for kind clusters |
internal/create | |
internal/create/actions | |
internal/create/actions/config | Package config implements the kubeadm config action |
internal/create/actions/installcni | Package installcni implements the install CNI action |
internal/create/actions/installstorage | Package installstorage implements the an action to isntall a default storageclass |
internal/create/actions/kubeadminit | Package kubeadminit implements the kubeadm init action |
internal/create/actions/kubeadmjoin | Package kubeadmjoin implements the kubeadm join action |
internal/create/actions/loadbalancer | Package loadbalancer implements the load balancer configuration action |
internal/create/actions/waitforready | Package waitforready implements the wait for ready action |
internal/delete | |
internal/kubeadm | Package kubeadm contains kubeadm related constants and configuration |
internal/kubeconfig | Package kubeconfig provides utilities kind uses internally to manage kind cluster kubeconfigs |
internal/kubeconfig/internal/kubeconfig | |
internal/loadbalancer | Package loadbalancer contains external loadbalancer related constants and configuration |
internal/logs | Package logs contains tooling for obtaining cluster logs |
internal/patch | Package patch contains helpers for applying patches |
internal/providers | |
internal/providers/common | Package common contains common code for implementing providers |
internal/providers/docker | |
internal/providers/podman | |
nodes | Package nodes provides a kind specific definition of a cluster node |
nodeutils | Package 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 41 packages. Updated 2021-01-21. Refresh now. Tools for package owners.