-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Installation And Usage Instruction #2
Comments
I only need backup and restore for dqlite. |
Hi @sstubbs, This migrator utility is packaged in the snap so what you have to do to take a backup is:
To restore the backup:
There are a few known issues that I am fixing right now:
We also want to expose this utility as a command, eg There is also the need to set the expectations right. A backup & restore cycle will restore the datastore but it will not immediately restore your cluster.
The service account keys (I think) that get restored from the backup will not be valid on the new cluster so they need to be reissued. Addons that update the kubernetes service arguments (eg the dns) or download binaries (eg helm) will need to be disabled and re-enabled. Some of the above are reasonable and may be handled by the Your feedback is much appreciated. Thank you. |
That is really great news. I will test it now. a |
I've just created a new microk8s cluster and enabled the following:
then backed it up and uninstalled the snap. Then reinstalled the snap and restored the backup. It works really well in terms of the backup and restore however you right about the service account tokens not being able to be mounted. Is there anything else I can do or test with this? This would be really great to have as I'm using openebs to manage local pvs which are on different drives and mounted on the hostpath. Ideally I would like to be able to reinstall microk8s without having to restore them all from external backups in the future. I am backing them up so not the end of the world but if it's possible to do this that would be awesome. I deleted and reapplied the cni.yaml but then calico goes into a crashloop after I stop and start microk8s |
Have a look at this comment kubernetes/kubernetes#91070 (comment) . In general the complete recovery of a k8s cluster from a back up is not a totally automatic process. |
ok thanks for the help. I will try this and different varations of disabling and reeabling plugins and the openebs chart and see. For my use it's mainly the bundled microk8s addons and openebs that I would like to recover as the openebs pvs use directories with unique ids on the hostpath. Everything else I have deployed can quickly and easily be redeployed anyway but if I didn't have to redeploy everything else that would be an added bonus. |
So I've been trying doing a recovery with the steps in various orders. I can't get this to work as coredns and calico just seem to cause too many problems with the previous versions being present in the backup. The only way I can think of would be to omit any resources related to calico and coredns from the backup so then a person could manually enable the dns plugin before restoring the database if they were using it before. This would be an amazing feature to have but I think I'm just going to keep using external backups for PVCS if reinstalling microk8s for the time being. Here are the steps where I can get some pods to run but I can't think of a better way until there is some other fix. Inintial Cluster Install
Encrypt kubernetes secrets
ulimit, secret encryption & max pods
encrypt all secrets
addons
Backup
Restore
Encrypt kubernetes secrets
ulimit, secret encryption & max pods
encrypt all secrets
Restore dqlite
|
Here is a suggestion you could try out by itself or in combination with what you already have. To take a backup do the following:
To restore:
The idea is that the "state of the cluster" is not only on the datastore but also on the arguments of the running services, the certificates issued and the credentials used by each component. |
This seems to work just about perfectly. All I had to do was delete the hanging calico pod but all services say repairing then start working too it seems. Will do some more testing. Really impressed though. Thanks! |
Hi,
I would really like to test this with microk8s. How do I install and use it?
The text was updated successfully, but these errors were encountered: