Closed ianb-mp closed 2 months ago
Does k0s apply
even exist? Do you mean k0s install
?
Also, in order to properly clean up node from kubernetes backend whichever it may be, I believe that needs to be done on kubernetes side e.g kubectl delete node
. k0s reset
is primarily locally significant i.e clean up on the local node.
Does k0s apply even exist? Do you mean k0s install?
Oh, I meant k0sctl apply
. I will update my post.
I have Kine configured to use a Postgres backend. When I do a k0s reset (via k0sctl reset) the postgres database is not cleared. I expect this is by design.
Yes, it is by design.
Perhaps k0s reset could output a warning message that the storage backend is using Kine and so may need clearing independent of k0s.
That would be good hint for users 👍 Any chance you could create a PR for this? 😄
That would be good hint for users 👍 Any chance you could create a PR for this? 😄
I will try to come back to it.
A minor thing, on the page 'Reset (Uninstall)' (https://docs.k0sproject.io/head/reset/?h=reset) it says this about data stored on the node:
all data stores managed by k0s, including etcd or kine data for cluster state and any temporary files created during operation,
This does seem misleading.
all data stores managed by k0s, including etcd or kine data for cluster state and any temporary files created during operation,
This does seem misleading.
This applies to data stores managed by k0s on that node. The reset
subcommand is inherently a tool to wipe a node, not to wipe a cluster. If you have a k0s-managed etcd peer or a k0s-managed kine SQLite database file on that node, those will be wiped. Other k0s-managed etcd peers in the cluster remain untouched. If you have external storage configured, be it an external etcd or some SQL backend, reset
will leave those untouched, as well. Maybe worth adding that.
Before creating an issue, make sure you've checked the following:
Platform
Version
v1.30.2+k0s.0
Sysinfo
`k0s sysinfo`
What happened?
I have Kine configured to use a Postgres backend. When I do a
k0s reset
(viak0sctl reset
) the postgres database is not cleared. I expect this is by design.The issue I encountered is if I run
k0sctl apply
after a reset, using the same hosts, the workers fail to deploy. I'm guessing there is old config in the postgres database that is conflicting. If I drop the postgres database betweenk0sctl reset
andk0sctl apply
, the deployment works fine.I think Kine should provide an option to clear the database; I understand this would need to be added in the upstream Kine repo, not k0s. Until then, it would be good if k0s could flag this to the user. Perhaps
k0s reset
could output a warning message that the storage backend is using Kine and so may need clearing independent of k0s.Steps to reproduce
1. 2. 3.
Expected behavior
No response
Actual behavior
No response
Screenshots and logs
No response
Additional context
No response