We have a solution we’re building where we provision an instance of microk8s on-demand for our users. As part of that process, we import a lot of resources (namespaces, persistent data stores, etc.), but we’re seeing that microk8s takes upwards of 1-3 minutes to create the “default” serviceaccount in each namespace, meaning we can’t create Pods until this is ready.
For example, our kafka statefulset has logs like:
Events:
Type Reason Age From Message
---- ------ ---- ---- -------
Normal SuccessfulCreate 2m39s statefulset-controller create Claim kafka-kafka-0 Pod kafka-0 in StatefulSet kafka success
Warning FailedCreate 2m33s (x4 over 2m38s) statefulset-controller create Pod kafka-0 in StatefulSet kafka failed error: pods "kafka-0" is forbidden: error looking up service account kafka/default: serviceaccount "default" not found
Normal SuccessfulCreate 2m32s statefulset-controller create Pod kafka-0 in StatefulSet kafka successful
I don’t see anything in the kubelite
logs immediately that might explain this delay – where should I look next?