microk8s.reset hangs when addons are enabled

Created on 22 Dec 2019  路  6Comments  路  Source: ubuntu/microk8s

Sometimes when addons using CRDs or api-services, resetting the cluster hangs during namespace deletion.
Reset also does not properly cleanup addon other resources such as service accounts, clusterroles, etc..

bug inactive

Most helpful comment

@ukd1 apiservices also needs to be deleted before the namespace. Otherwise it will be stuck in Terminating state.

kubectl delete apiservices --all. IIRC.

All 6 comments

Hi, I am not really sure if its the addons that's causing this problem. I tried disabling the addons and running microk8s.reset then. The command hangs after the namespace deletion. Any suggestions?

This usually happens when crds are still being used. If somewhere you have crds used in a namespace, you must delete it first prior to deleting the namespace.

@mayankshah1607 thanks for the info. I was thinking about this further, perhaps should move the crd deletion earlier.

https://github.com/ubuntu/microk8s/blob/dbc90b6332ee0d96d94ebeaab044b2815adfe01f/microk8s-resources/wrappers/microk8s-reset.wrapper#L54

Will try this one out. Thanks 馃憤

I'm still seeing this as well, even after trying @balchua's suggestion.

@ukd1 apiservices also needs to be deleted before the namespace. Otherwise it will be stuck in Terminating state.

kubectl delete apiservices --all. IIRC.

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

Was this page helpful?
0 / 5 - 0 ratings