vsphere

package
v0.0.0-...-86ffc8e Latest Latest
Warning

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

Go to latest
Published: Jun 6, 2018 License: Apache-2.0 Imports: 28 Imported by: 0

README

Cluster API vSphere Provider

Delete Cluster

This guide explains how to delete all resources that were created as part of your Cluster API Kubernetes cluster.

The provider currently only creates resources specified in the named machine config map. The default examples only provision VMs. If your custom HCL config configures load balancers, or provisions other resources, amend this guide as necessary.

  1. Delete all of the node Machines in the cluster. Make sure to wait for the corresponding Nodes to be deleted before moving onto the next step. After this step, the master node will be the only remaining node.
kubectl delete machines -l set=node
kubectl get nodes
  1. Delete the VM that is running your cluster's control plane. You can either do this from the vCenter UI or using govc.
govc vm.destroy --dc=$VSPHERE-DC $VM-NAME

Documentation

Index

Constants

View Source
const (
	VmIpAnnotationKey                = "vm-ip-address"
	ControlPlaneVersionAnnotationKey = "control-plane-version"
	KubeletVersionAnnotationKey      = "kubelet-version"

	// Filename in which named machines are saved using a ConfigMap (in master).
	NamedMachinesFilename = "vsphere_named_machines.yaml"

	// The contents of the tfstate file for a machine.
	StatusMachineTerraformState = "tf-state"
)
View Source
const (
	StageDir               = "/tmp/cluster-api/machines"
	MachinePathStageFormat = "/tmp/cluster-api/machines/%s/"
	TfConfigFilename       = "terraform.tf"
	TfVarsFilename         = "variables.tfvars"
	TfStateFilename        = "terraform.tfstate"
)
View Source
const InstanceStatusAnnotationKey = "instance-status"

Variables

This section is empty.

Functions

func CreateApiServerAndController

func CreateApiServerAndController(token string) error

func CreateExtApiServerRoleBinding

func CreateExtApiServerRoleBinding() error

TODO: We need to change this when we create dedicated service account for apiserver/controller pod.

func PreloadMasterScript

func PreloadMasterScript(version string, dockerImages []string) (string, error)

PreloadMasterScript returns a script that can be used to preload a master.

func PreloadNodeScript

func PreloadNodeScript(version string, dockerImages []string) (string, error)

PreloadNodeScript returns a script that can be used to preload a master.

Types

type DeploymentClient

type DeploymentClient struct{}

Contains vsphere-specific deployment logic intended to eventually implement ProviderDeployer interface at sigs.k8s.io/cluster-api/clusterctl/clusterdeployer/clusterdeployer.go Currently implements a subset of the machineDeployer interface at sigs.k8s.io/cluster-api/vsphere-deployer/deploy/machinedeployer.go till vsphere-deployer gets deleted

func NewDeploymentClient

func NewDeploymentClient() *DeploymentClient

func (*DeploymentClient) GetIP

func (*DeploymentClient) GetIP(machine *clusterv1.Machine) (string, error)

func (*DeploymentClient) GetKubeConfig

func (d *DeploymentClient) GetKubeConfig(master *clusterv1.Machine) (string, error)

type VsphereClient

type VsphereClient struct {

	// Once the vsphere-deployer is deleted, both DeploymentClient and VsphereClient can depend on
	// something that implements GetIP instead of the VsphereClient depending on DeploymentClient.
	*DeploymentClient
	// contains filtered or unexported fields
}

func NewMachineActuator

func NewMachineActuator(kubeadmToken string, machineClient client.MachineInterface, namedMachinePath string) (*VsphereClient, error)

func (*VsphereClient) Create

func (vc *VsphereClient) Create(cluster *clusterv1.Cluster, machine *clusterv1.Machine) error

func (*VsphereClient) Delete

func (vc *VsphereClient) Delete(cluster *clusterv1.Cluster, machine *clusterv1.Machine) error

func (*VsphereClient) Exists

func (vc *VsphereClient) Exists(cluster *clusterv1.Cluster, machine *clusterv1.Machine) (bool, error)

func (*VsphereClient) GetTfState

func (vc *VsphereClient) GetTfState(machine *clusterv1.Machine) (string, error)

func (*VsphereClient) PostDelete

func (vc *VsphereClient) PostDelete(cluster *clusterv1.Cluster, machines []*clusterv1.Machine) error

func (*VsphereClient) Update

func (vc *VsphereClient) Update(cluster *clusterv1.Cluster, goalMachine *clusterv1.Machine) error

Directories

Path Synopsis
cmd

Jump to

Keyboard shortcuts

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