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

Unable To Interact With Microk8s on Windows 2022 With Virtual Box #4476

Closed
ThePieMonster opened this issue Mar 31, 2024 · 5 comments
Closed
Labels
kind/support Question with a workaround

Comments

@ThePieMonster
Copy link

Summary

Unable to interact wth microk8s

microk8s kubectl get pods

E0331 18:54:13.759087 3084 memcache.go:265] couldn't get current server API group list: Get "https://10.0.2.15:16443/api?timeout=32s": dial tcp 10.0.2.15:16443: connectex: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.

What Should Happen Instead?

kubectl command provides information

Reproduction Steps

Install microk8s with Oracle Virtual Box on Windows Server 2022 and try to interact with the cluster.

Introspection Report

inspection-report-20240331_185644.tar.gz

@ThePieMonster
Copy link
Author

ThePieMonster commented Apr 1, 2024

Found a similar issue from some time ago.
#3388 @doggy8088 @madalinignisca

If the IP of the master node changed, how would I know? Where would I find the new IP?

@neoaggelos
Copy link
Member

Hi @ThePieMonster, you should either ensure that the VM has the same IP address across reboots (see linked issue for some steps), or simply see the current IP (by means of ifconfig on the VM) and adjust your kubeconfig accordingly.

@neoaggelos neoaggelos added the kind/support Question with a workaround label Apr 1, 2024
@ThePieMonster
Copy link
Author

@neoaggelos The host machine that is running MicroK8S is a physical windows server machine with a static IP.
I don't see how that would impact this however.

@neoaggelos
Copy link
Member

Ah, okay, this could probably be a different kind of issue than the one you linked. I am seeing this in the logs of k8s-dqlite:

Mar 31 18:07:44 microk8s-vm microk8s.daemon-k8s-dqlite[1776]: /snap/microk8s/6541/bin/grep: /usr/local/lib/sysctl.d/: No such file or directory

Can you try to create this directory manually? Running something along those lines on the VM should help:

sudo mkdir -p /usr/local/lib/sysctl.d/
sudo snap restart microk8s

Then, observe the logs to see if k8s-dqlite is coming up with:

sudo journalctl -u snap.microk8s.daemon-k8s-dqlite -f

@ThePieMonster
Copy link
Author

I ended up switching to MiniKube as it runs in the context of Docker or Hyper-V without issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/support Question with a workaround
Projects
None yet
Development

No branches or pull requests

2 participants