Back up with an in-cluster storage provider
By default, MKE 4 stores backups and restores using the in-cluster storage provider, the MinIO add-on.
Create an in-cluster backup
To create an in-cluster backup, run:
mkectl backup create --name <name>
Example output:
mkectl backup create --name test
INFO[0000] Creating backup test...
Backup request "test" submitted successfully.
Run `velero backup describe test` or `velero backup logs test` for more details.
INFO[0000] Waiting for backup test to complete...
INFO[0003] Waiting for backup to complete. Current phase: InProgress
INFO[0006] Waiting for backup to complete. Current phase: InProgress
INFO[0009] Waiting for backup to complete. Current phase: InProgress
INFO[0012] Waiting for backup to complete. Current phase: InProgress
INFO[0015] Waiting for backup to complete. Current phase: Completed
The backup should be present in the MinIO bucket.
To list the backups, run:
mkectl backup list
Example output:
mkectl backup list
NAME STATUS ERRORS WARNINGS CREATED EXPIRES STORAGE LOCATION SELECTOR
test Completed 0 0 2024-05-07 17:29:18 -0400 EDT 29d default <none>
To view detailed logs of a backup, log in to the MinIO UI.
Restore from an in-cluster backup
A restore operation returns the Kubernetes cluster to the state it was in at the time the backup you selected was created.
To perform a restore using an in-cluster backup, run:
mkectl restore create --name test
Example output:
mkectl restore create --name test
INFO[0000] Waiting for restore test-20240507173309 to complete...
INFO[0000] Waiting for restore to complete. Current phase: InProgress
INFO[0003] Waiting for restore to complete. Current phase: InProgress
INFO[0006] Waiting for restore to complete. Current phase: InProgress
INFO[0009] Waiting for restore to complete. Current phase: InProgress
INFO[0012] Waiting for restore to complete. Current phase: InProgress
INFO[0015] Waiting for restore to complete. Current phase: InProgress
INFO[0018] Waiting for restore to complete. Current phase: InProgress
INFO[0021] Waiting for restore to complete. Current phase: InProgress
INFO[0024] Waiting for restore to complete. Current phase: InProgress
INFO[0027] Waiting for restore to complete. Current phase: Completed
INFO[0027] Restore test-20240507173309 completed successfully
To list the restores, run:
mkectl restore list
Example output:
mkectl restore list
NAME BACKUP STATUS STARTED COMPLETED ERRORS WARNINGS CREATED SELECTOR
test-20240507173309 test Completed 2024-05-07 17:33:09 -0400 EDT 2024-05-07 17:33:34 -0400 EDT 0 121 2024-05-07 17:33:09 -0400 EDT <none>
To view detailed logs, log in to the MinIO UI.
Access the MinIO Console
To access the MinIO Console:
Obtain the username from your cluster:
kubectl --kubeconfig <path_to_kubeconfig> get secret -n mke minio-credentials -o jsonpath='{.data.root-user}' | base64 -d
Obtain the password from your cluster:
kubectl --kubeconfig <path_to_kubeconfig> get secret -n mke minio-credentials -o jsonpath='{.data.root-password}' | base64 -d
Navigate to the external address for your ingress controller under
/minio/
.Example:
https://<external_address>/minio/
Log in using the username and password. The Velero bucket displays under the Object browser, and you can download or upload backups, using the options provided by the MinIO UI.