I run microk8s dashboard-proxy, and it generates a token to access through web browser, but randomly either using or without using it, it fails, I see an error in the console, and the web stops responding.
I didn’t make any configuration, so I assume it should work out of the box after enabling dashboard, and running it (shouldn’t it autorun everytime, instead of requiring to run it?)
Following there is the error that I receive:
E0529 10:24:47.305513 175744 portforward.go:413] an error occurred forwarding 10443 -> 8443: error forwarding port 8443 to pod de9203e5b8186312eff6aa402c75acb856841b643b1e33917db71325936c7fcd, uid : failed to execute portforward in network namespace "/var/run/netns/cni-aa51d309-db2b-24cc-10d7-3f134ea7aede": failed to connect to localhost:8443 inside namespace "de9203e5b8186312eff6aa402c75acb856841b643b1e33917db71325936c7fcd", IPv4: dial tcp4 127.0.0.1:8443: connect: connection refused IPv6 dial tcp6: address localhost: no suitable address found
error: lost connection to pod
Traceback (most recent call last):
File "/snap/microk8s/6782/scripts/wrappers/dashboard_proxy.py", line 111, in <module>
dashboard_proxy()
File "/snap/microk8s/6782/usr/lib/python3/dist-packages/click/core.py", line 764, in __call__
return self.main(*args, **kwargs)
File "/snap/microk8s/6782/usr/lib/python3/dist-packages/click/core.py", line 717, in main
rv = self.invoke(ctx)
File "/snap/microk8s/6782/usr/lib/python3/dist-packages/click/core.py", line 956, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/snap/microk8s/6782/usr/lib/python3/dist-packages/click/core.py", line 555, in invoke
return callback(*args, **kwargs)
File "/snap/microk8s/6782/scripts/wrappers/dashboard_proxy.py", line 105, in dashboard_proxy
check_output(command)
File "/snap/microk8s/6782/usr/lib/python3.8/subprocess.py", line 415, in check_output
return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
File "/snap/microk8s/6782/usr/lib/python3.8/subprocess.py", line 516, in run
raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['/snap/microk8s/6782/microk8s-kubectl.wrapper', 'port-forward', '-n', 'kube-system', 'service/kubernetes-dashboard', '10443:443', '--address', '0.0.0.0']' returned non-zero exit status 1.
Following this post port forwarding on microk8s on mac m1 I changed the service to NodePort, and I manged to get a different port assigned, but the error persists and the error message seems to be the same.
Any feedback is really appreciated.