canonical/microk8s

microk8s is not running enabling rbac

Closed this issue · 2 comments

Summary

I'm running MicroK8s v1.31.2 revision 7394 on Ubuntu 18~22.04.1- in AWS

I have RBAC enabled and run microk8s status. I get back.
microk8s is not running. Use microk8s inspect for a deeper inspection.

If I disable RBAC, the microk8s status returns as good.

What Should Happen Instead?

With RBAC enabled, microk8s status returns as good

Reproduction Steps

  1. microk8s enable rbac
  2. microk8s status
  3. microk8s idsable rbac

Introspection Report

inspection-report-20241102_021427.tar.gz

Can you suggest a fix?

I followed an old issue here ;
k -n ingress edit role nginx-ingress-microk8s-role

Added this line

`resourceNames:

  • ingress-controller-leader-public`

But didn't help

Are you interested in contributing with a fix?

Thanks

Hi @harrypottar,

I cannot reproduce this issue.

When you enable/disable RBAC the API server needs to be reconfigured and restarted with new arguments. Is it possible that your microk8s status was performed while the API server was restarting? Could you try again with microk8s.status --wait-ready ?

Hello,
Thanks for the feedback. I tried everything.

When I noticed it stopped running, pods were waiting to be scheduled, or pods were not terminating, and after some research, the issue was RBAC. With RBAC disabled it ran fine, with it enabled it stop running.

After more research, I found that I had a capital in the hostname, which can cause issues in Kubernetes, so I fixed the hostname and reissued certs, etc.

Still no joy, I spent the weekend trying to fix in place.

Sunday evening, I just decided to uninstall and purge MicroK8s; it was good practice when I had to in an emergency.

So far everything is up and running, I'm keeping a close eye on it, but not knowing what caused it does not help.

I'm putting it down to an incorrect hostname and see where I go from there; fingers crossed

Thanks
Harry