microk8s icon indicating copy to clipboard operation
microk8s copied to clipboard

[1.27-strict] Dashboard add-on UI failures (internal error) when first accessed

Open tonyespy opened this issue 1 year ago • 1 comments

Summary

The dashboard add-on UI fails the first time it's accessed after being enabled.

After enabling the add-on, retrieving the token, and starting the proxy, when I access the dashboard via a browser and click any of the navigation items (e.g. Deployments), the UI shows the error:

ternal Error (500) go-jose: error in cryptographic primitive

If I wait 5-10m and reload the screen, the login screen is displayed and I can enter my token and everything seems to work OK from then on.

What Should Happen Instead?

After enabling the dashboard, I should be able to use the token to access the UI and at minimum, view objects (e.g. Deployments) created using kubectl.

Reproduction Steps

I'm able to reproduce this issue pretty consistently. The one time it didn't happen, was probably due to timing (i.e. I waited too long before trying to access the UI). Seems like there may be an underlying race condition...

  1. sudo snap install microk8s --channel=1.27-strict
  2. sudo microk8s.enable dashboard
  3. sudo microk8s.kubectl describe secret -n kube-system microk8s-dashboard-token
  4. sudo microk8s kubectl port-forward -n kube-system service/kubernetes-dashboard 10443:443
  5. from a browser, open https://127.0.0.1:10443
  6. click on Deployments or any other object in the navigation pane
  7. The screen shows:

ternal Error (500) go-jose: error in cryptographic primitive

microk8s-dashboard-internal-error

I've occasionally been able to get a login screen to display where I can enter the token. After I do this, the crypto error is no longer displayed, but I still can't view any objects that have been created via kubectl, instead it

Introspection Report

inspection-report-20230731_180106.tar.gz

Version Details

  • arch: arm64
  • channel: 1.27-strict/stable
  • version/revision: 1.27.3 / 5590
  • OS: Ubuntu 22.04 LTS Desktop

Can you suggest a fix?

Are you interested in contributing with a fix?

tonyespy avatar Jul 31 '23 22:07 tonyespy