Documentation ¶
Overview ¶
Package recovery provides tooling to help with control plane disaster recovery. Recover() uses a Backend to extract the control plane from a store, such as etcd, and use those to write assets that can be used by `bootkube start` to reboot the control plane.
The recovery tool assumes that the component names for the control plane elements are the same as what is output by `bootkube render`. The `bootkube start` command also makes this assumption. It also assumes that kubeconfig on the kubelet is located at /etc/kubernetes/kubeconfig, though that can be changed in the bootstrap manifests that are rendered.
Index ¶
Constants ¶
const (
RecoveryEtcdClientAddr = "http://localhost:52379"
)
Variables ¶
This section is empty.
Functions ¶
func CleanRecoveryEtcd ¶ added in v0.4.5
CleanRecoveryEtcd removes the recovery etcd static pod manifest and stops the recovery etcd container.
func Recover ¶
Recover recovers a control plane using the provided backend and kubeConfigPath, returning assets for the existing control plane and a bootstrap control plane that can be used with `bootkube start` to re-bootstrap the control plane.
func StartRecoveryEtcdForBackup ¶ added in v0.4.5
StartRecoveryEtcdForBackup starts a recovery etcd container using given backup. The started etcd server listens on RecoveryEtcdClientAddr.
Types ¶
type Backend ¶
type Backend interface {
// contains filtered or unexported methods
}
Backend defines an interface for any backend that can populate a controlPlane struct.
func NewAPIServerBackend ¶
NewAPIServerBackend constructs a new backend to talk to the API server using the given kubeConfig.
TODO(diegs): support using a service account instead of a kubeconfig.
func NewEtcdBackend ¶
NewEtcdBackend constructs a new etcdBackend for the given client and pathPrefix.