microk8s (Windows) command not found after fresh installation

Created on 24 Jun 2020  路  18Comments  路  Source: ubuntu/microk8s

Please run microk8s inspect and attach the generated tarball to this issue. --> Sorry cannot run microk8s inspect

After fresh / first installation of microk8s on Windows 10 Pro (Version 1903) with the 2.0 installer, i cannot run microk8s commands. All commands are returning:

sudo: microk8s.status: command not found
An error occurred when trying to execute 'sudo microk8s.status --wait-ready' with 'multipass': returned exit code 1.

or

sudo: microk8s.inspect: command not found
An error occurred when trying to execute 'sudo microk8s.inspect' with 'multipass': returned exit code 1.

bug

All 18 comments

Hey @mmattersdorfer,

Can you try microk8s status, i.e. a space and not a period?

Thanks,
Joe

Hi @joedborg,

I tried it with a space.... In the error message there is always a period instead.

Greetings,
Marcus

Thanks @mmattersdorfer

Did you check the "Add MicroK8s to PATH" when installing? And have you tried opening a new cmd window to try?

Thanks,
Joe

Hello @joedborg,

yes I checked the option to add microk8s to the path. And I used a new CMD. I even tried a reboot. No success.

Thanks for your help.

No problem @mmattersdorfer, we'll get to the bottom of this.

Can you open a cmd window and show me the output of echo %PATH%, please?

Hi @joedborg,

here is the result of echo %PATH%:

C:\Program Files\AdoptOpenJDK\jdk-8.0.242.08-hotspot\bin;C:\Program Files\AdoptOpenJDK\jdk-11.0.6.10-hotspot\bin;C:\Program Files (x86)\Common Files\Oracle\Java\javapath;c:\ProgramData\chocolatey\bin\;C:\Python38\Scripts\;C:\Python38\;C:\windows\system32;C:\windows;C:\windows\System32\Wbem;C:\windows\System32\WindowsPowerShell\v1.0\;C:\windows\System32\OpenSSH\;C:\Program Files\PuTTY\;C:\ProgramData\chocolatey\bin;C:\Program Files\Microsoft VS Code\bin;C:\tools\groovy-3.0.3\bin;c:\Tools\apache-maven-3.6.2\bin;C:\Program Files (x86)\Plantronics\Spokes3G\;C:\Program Files\MiKTeX 2.9\miktex\bin\x64\;C:\Program Files\Gitcmd;C:\Program Files (x86)\Webex\Plugins;C:\Users\usimmatter.jpm\windows\bin;C:\Program Files (x86)\Yarn\bin\;C:\tools\groovy-3.0.3\bin;C:\Program Files (x86)\Sennheiser\SoftphoneSDK\;C:\tools\groovy-3.0.3\bin;C:\Program Files\nodejs\;C:\Program Files\Docker\Docker\resources\bin;C:\ProgramData\DockerDesktop\version-bin;C:\Users\usimmatter.windows-build-tools\python27\;C:\Users\usimmatter\AppData\Local\Microsoft\WindowsApps;C:\Program Files\Oracle\VirtualBox;C:\tools\dart-sdk\bin;C:\Users\usimmatter\AppData\Roaming\Pub\Cache\bin;C:\tools\flutter;C:\Users\usimmatter\AppData\Local\Pandoc\;C:\Users\usimmatter\AppData\Local\Yarn\bin;C:\Program Files\kdiff3;C:\Users\usimmatter\AppData\Roaming\npm;C:\Program Files\Multipass\bin;C:\Program Files\MicroK8s

I can confirm this also happens for me, this is sadly a blocking issue for the windows installer.

microk8s status
sudo: microk8s.status: command not found
An error occurred when trying to execute 'sudo microk8s.status' with 'multipass': returned exit code 1.

Hi!

Is there any update on this? I installed yesterday on Windows 10 pro version 2004 and I'm getting the same error. Path seems to be correct.

Thanks,
Daniel.

Hi @mmattersdorfer, apologies for the late reply, GitHub notifications really suck...

It looks like PATH is set correctly (C:\Program Files\MicroK8s).

Could you please open a cmd and run multipass exec microk8s-vm -- sudo snap list and check that microk8s is listed?

Thanks,
Joe

@wjpbiblio @dmirandab ^ if you could try that too, it'd be a great help. thanks!

Hi Joe,

here is the result:
No snaps are installed yet. Try 'snap install hello-world'.

Greetings
Marcus

Trying to install microk8s snap manually ends in this:

multipass exec microk8s-vm -- sudo snap install microk8s --classic --channel=1.18/stable

error: cannot install "microk8s": persistent network error: Post
https://api.snapcraft.io/v2/snaps/refresh: dial tcp: lookup api.snapcraft.io: Temporary
failure in name resolution

Hey @mmattersdorfer,

Ah, thanks. We do check for networking issue during install, so not sure why that was missed.

Assuming

multipass exec microk8s-vm -- sudo ping -c 1 1.1.1.1
multipass exec microk8s-vm -- sudo ping -c 1 snapcraft.io

both fail, can you try looking over https://multipass.run/docs/troubleshooting-networking-on-windows to see if that fixes your issue. If not, you could also switch to using Virtualbox instead of Hyper-V. I know this can be inconvenient, but if it's an option it'll likely remedy the issues.

Thanks,
Joe

Hey all,

I ended up following this blog post which lead to a successful installation of microk8s over WSL2: https://wsl.dev/wsl2-microk8s/

Cheers!

Hi @joedborg ,

the firewall of my company vpn blocked the calls. I deactivted it and then the pings and installation worked. Also the microk8s commands are now working.

Thanks,
Marcus

Perfect, thanks for the update @mmattersdorfer

I still have this issue on windows. the network test is fine (ping to 1.1.1.1 and netcraft works)

An error occurred when trying to execute 'sudo microk8s.status --wait-ready' with 'multipass': returned exit code 1.

I still have this issue on windows. the network test is fine (ping to 1.1.1.1 and netcraft works)

An error occurred when trying to execute 'sudo microk8s.status --wait-ready' with 'multipass': returned exit code 1.

Just run:

multipass exec microk8s-vm -- sudo snap install microk8s --classic

and it all should start working fine.

Was this page helpful?
0 / 5 - 0 ratings