mkectl restore
mkectl restore#
Restores from a backup of the MKE 4 Kubernetes management cluster.
mkectl restore [flags]
Examples#
mkectl restore --name backup.tar --hosts-path hosts.yaml
The --hosts-path file must contain a top-level 'hosts:' list — NOT a full mke4.yaml
config. Restore bootstraps a single-node cluster, so exactly ONE host is expected and
its role must be 'controller+worker' (the only supported controller role). If more than
one host is listed, only the first is used. Example hosts.yaml:
hosts:
- role: controller+worker
installFlags: # optional
- "--profile=custom-profile"
ssh:
address: 10.0.1.15
user: root
keyPath: ~/.ssh/key.pem
port: 22
bastion: # optional
address: 1.2.3.4
user: root
keyPath: ~/.ssh/bastion-key.pem
port: 22
Options#
--force Ignore user confirmation
-h, --help help for restore
--hosts-path string Path to the hosts.yaml naming the controller node to restore the cluster onto (required)
--lease-adopt-stale if true, matching stale lease would be adopted instead of failing with error
--lease-renew-interval duration lease renew interval for cluster-wide/node operations, should be < leaseTTL (default 20s)
--lease-ttl duration lease TTL for cluster-wide/node operations (default 1m0s)
--name string Name and path of the snapshot to restore (default "backup.tar")
--registry-insecure-skip-tls-verify Skip TLS verification for the image/chart registry
Options inherited from parent commands#
-f, --file string path to the config file. Not needed for restore where config is loaded from the backup (default "mke4.yaml")
--kubeconfig string path to the kubeconfig file of the existing or restored cluster. DO NOT USE when creating a new cluster (default "/home/runner/.mke/mke.kubeconf")
-l, --logLevel string specify a log level (info, warn, debug, trace, error) (default "info")
--no-color when provided, disables colored output
--no-pretty-print when provided, disables pretty print output formatting
--version version[=true] --version, --version=raw prints version information and quits; --version=vX.Y.Z... sets the reported version