kubeadm

package
v1.33.0 Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2024 License: Apache-2.0 Imports: 49 Imported by: 14

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrInitTimedout = fmt.Errorf("kubeadm init timed out in %d minutes", initTimeoutMinutes)

ErrInitTimedout is thrown if kubeadm init takes longer than max time allowed

View Source
var ErrNoExecLinux = &FailFastError{errors.New("mounted kubeadm binary is not executable")}

ErrNoExecLinux is thrown on linux when the kubeadm binaries are mounted in a noexec volume on Linux as seen in https://github.com/kubernetes/minikube/issues/8327#issuecomment-651288459 this error could be seen on docker/podman or none driver.

Functions

func StopKubernetes added in v1.25.0

func StopKubernetes(runner command.Runner, cr cruntime.Manager)

StopKubernetes attempts to stop existing kubernetes.

Types

type Bootstrapper added in v1.0.0

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

Bootstrapper is a bootstrapper using kubeadm

func NewBootstrapper added in v1.7.0

func NewBootstrapper(_ libmachine.API, cc config.ClusterConfig, r command.Runner) (*Bootstrapper, error)

NewBootstrapper creates a new kubeadm.Bootstrapper

func (*Bootstrapper) DeleteCluster added in v1.0.0

func (k *Bootstrapper) DeleteCluster(k8s config.KubernetesConfig) error

DeleteCluster removes the components that were started earlier

func (*Bootstrapper) GenerateToken added in v1.9.0

func (k *Bootstrapper) GenerateToken(cc config.ClusterConfig) (string, error)

GenerateToken creates a token and returns the appropriate kubeadm join command to run, or the already existing token

func (*Bootstrapper) GetAPIServerStatus added in v1.0.0

func (k *Bootstrapper) GetAPIServerStatus(hostname string, port int) (string, error)

GetAPIServerStatus returns the api-server status

func (*Bootstrapper) JoinCluster added in v1.9.0

func (k *Bootstrapper) JoinCluster(cc config.ClusterConfig, n config.Node, joinCmd string) error

JoinCluster adds new node to an existing cluster.

func (*Bootstrapper) LabelAndUntaintNode added in v1.33.0

func (k *Bootstrapper) LabelAndUntaintNode(cfg config.ClusterConfig, n config.Node) error

func (*Bootstrapper) LogCommands added in v1.0.0

LogCommands returns a map of log type to a command which will display that log.

func (*Bootstrapper) SetupCerts added in v1.0.0

func (k *Bootstrapper) SetupCerts(k8s config.ClusterConfig, n config.Node, pcpCmd cruntime.CommandRunner) error

SetupCerts sets up certificates within the cluster.

func (*Bootstrapper) StartCluster added in v1.0.0

func (k *Bootstrapper) StartCluster(cfg config.ClusterConfig) error

StartCluster starts the cluster

func (*Bootstrapper) UpdateCluster added in v1.0.0

func (k *Bootstrapper) UpdateCluster(cfg config.ClusterConfig) error

UpdateCluster updates the control plane with cluster-level info.

func (*Bootstrapper) UpdateNode added in v1.9.0

func (k *Bootstrapper) UpdateNode(cfg config.ClusterConfig, n config.Node, r cruntime.Manager) error

UpdateNode updates new or existing node.

func (*Bootstrapper) WaitForNode added in v1.9.0

func (k *Bootstrapper) WaitForNode(cfg config.ClusterConfig, n config.Node, timeout time.Duration) error

WaitForNode blocks until the node appears to be healthy

type FailFastError added in v1.12.0

type FailFastError struct {
	Err error
}

FailFastError type is an error that could not be solved by trying again

func (*FailFastError) Error added in v1.12.0

func (f *FailFastError) Error() string

Jump to

Keyboard shortcuts

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