Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Microk8s stuck and cannot connect to VM on MacOS #4456

Open
aaronpliu opened this issue Mar 11, 2024 · 5 comments
Open

Microk8s stuck and cannot connect to VM on MacOS #4456

aaronpliu opened this issue Mar 11, 2024 · 5 comments

Comments

@aaronpliu
Copy link

aaronpliu commented Mar 11, 2024

Summary

I installed Microk8s latest version on MacOS M2. it was working fine after installation, but weird behavior appeared after it running for a couple of days that whatever type multipass command or microk8s kubectl command to access, it's very slow or no response. Even if I use k9s to access, it lost all of connection info. Firstly, I doubt it's due to Apple M2 issue, then switch to Apple Intel, it's still same issue.

I really would like to install an available k8s cluster in MacOS. However, microk8s cannot be running with stable status. Actually, I did not install any other image there (Only enable required plugins, like registry, dns, dashboard, istio...etc).

Btw, I stopped microk8s instance and restart a new one, the IP address changed, and microk8s is OK to access again (it still repeat the same behavior, become slow -> not access -> no response for kubectl command -> down)

@ktsakalozos
Copy link
Member

@aaronpliu would you be able to share an inspection report tarball so we have a look at the logs (microk8s inspect).

@codeyash
Copy link

codeyash commented Dec 4, 2024

microk8s inspect
exec failed: ssh connection failed: 'Failed to connect: No route to host'
An error occurred when trying to execute 'sudo microk8s.inspect' with 'multipass': returned exit code 2.

@codeyash
Copy link

codeyash commented Dec 4, 2024

Warning: the "--mem" long option is deprecated in favour of "--memory". Please update any scripts, etc.
Launched: microk8s-vm
exec failed: ssh connection failed: 'Failed to connect: No route to host'
An error occurred when trying to execute 'sudo ping -c 1 snapcraft.io' with 'multipass': returned exit code 2.
exec failed: ssh connection failed: 'Failed to connect: No route to host'
An error occurred when trying to execute 'sudo microk8s.status --wait-ready' with 'multipass': returned exit code 2.
E1204 01:49:44.762016 13649 memcache.go:265] "Unhandled Error" err="couldn't get current server API group list: Get "https://192.168.64.30:16443/api?timeout=32s\": dial tcp 192.168.64.30:16443: connect: no route to host"

@codeyash
Copy link

codeyash commented Dec 4, 2024

Firewall is disabled. Let me know if additional info is needed.

@goneng
Copy link

goneng commented Jan 11, 2025

I had this issue with channel 1.26 installed, and was able to solve it by upgrading MicroK8s to a later version
(in my case: channel 1.29/stable), like so:

microk8s uninstall
(...)
microk8s install --channel=1.29/stable

(still getting Warning: the "--mem" long option is deprecated in favour of "--memory".
but apart from that it seems to be working)

Have used this guide to choose a stable channel:
MicroK8s > How to Guides > Selecting a snap channel

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants