microk8s: Fails on macOS Catalina
None of the commands provided for setting micro8s up or for reporting issues work on Catalina:
$ microk8s install
Support for 'multipass' needs to be set up. Would you like to do that it now? [y/N]: y
==> Downloading https://github.com/CanonicalLtd/multipass/releases/download/v1.3.0/multipass-1.3.0+mac-Darwin.pkg
==> Downloading from https://github-production-release-asset-2e65be.s3.amazonaws.com/114128199/2ced4a00-a9d8-11ea-82d1-074169520188?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWNJ
######################################################################## 100.0%
==> Verifying SHA-256 checksum for Cask 'multipass'.
==> Installing Cask multipass
==> Running installer for multipass; your password may be necessary.
==> Package installers may write to any location; options such as --appdir are ignored.
Password:
installer: Package name is multipass
installer: Installing at base path /
installer: The install was successful.
🥃 multipass was successfully installed!
Waiting for multipass...
Launched: microk8s-vm
ping: snapcraft.io: Temporary failure in name resolution
An error occurred when trying to execute 'sudo ping -c 1 snapcraft.io' with 'multipass': returned exit code 2.
$ microk8s install
MicroK8s is up and running. See the available commands with `microk8s --help`.
$ microk8s stop
sudo: microk8s.stop: command not found
An error occurred when trying to execute 'sudo microk8s.stop' with 'multipass': returned exit code 1.
$ microk8s inspect
sudo: microk8s.inspect: command not found
An error occurred when trying to execute 'sudo microk8s.inspect' with 'multipass': returned exit code 1.
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Comments: 18 (5 by maintainers)
This fix no longer works, as the ping itself may fail on some MacOS situations. Instead, it’s better to test connectivity in a different way, for example:
Seems to be caused by dnsmasq. Patched it with this change to /usr/local/Cellar/microk8s/2.1.0/libexec/lib/python3.9/site-packages/vm_providers/_base_provider.py
I had the same problem (
ping: snapcraft.io: Temporary failure in name resolution). It was caused by dnsmasq already running. After uninstalling it via brew and stopping the process (sudo launchctl unload /Library/LaunchDaemons/homebrew.mxcl.dnsmasq.plist),microk8s installworked without errors.@joedborg
I had the same problem with multipass. Virtualbox did the trick for me for a quick fix. Installed from here. Then ran
sudo multipass set local.driver=virtualbox.This is partly true and partly false. A stock ubuntu VM is launched, and the installer then sets up MicroK8s by installing the snap
@sjmcdowall it appears that for some reason the installation failed. could you clean up and retry with:
Thanks!
I am on MacOS Monterey 12.6 - and can’t get microk8s up and running – having similar but slightly different issues from what I can see above …
Here is a set of error messages I am seeing – ` …/play/microk8s  microk8s install  ✔  10078  11:28:48 Launched: microk8s-vm An error occurred when trying to execute ‘sudo ping -c 1 snapcraft.io’ with ‘multipass’: returned exit code 1. …/play/microk8s  multipass exec microk8s-vm – sudo ping -c 1 snapcraft.io  2 ↵  10079  11:29:59 PING snapcraft.io (198.18.2.5) 56(84) bytes of data.
— snapcraft.io ping statistics — 1 packets transmitted, 0 received, 100% packet loss, time 0ms
…/play/microk8s  multipass exec microk8s-vm – sudo ping -c 1 1.1.1.1  1 ↵  10080  11:30:25 PING 1.1.1.1 (1.1.1.1) 56(84) bytes of data. 64 bytes from 1.1.1.1: icmp_seq=1 ttl=54 time=95.2 ms
— 1.1.1.1 ping statistics — 1 packets transmitted, 1 received, 0% packet loss, time 0ms rtt min/avg/max/mdev = 95.214/95.214/95.214/0.000 ms …/play/microk8s  microk8s status --wait-ready  ✔  10081  11:30:34 sudo: microk8s.status: command not found An error occurred when trying to execute ‘sudo microk8s.status --wait-ready’ with ‘multipass’: returned exit code 1.`
I am not sure it’s DNS resolution since snapcraft.io resolves to 198.18.2.5 but that just sits there … which appears to resolve to localhost (?) via this netstat … which means something is supposed to be running on this address?? I am pretty much a total newbie on microk8s and snap and multipass …
This was a pure vanilla install via brew install ubuntu/microk8s/microk8s
Any help and direction would be greatly appreciated …
TIA!
Hi @joedborg
On the MAC OSx version of the microk8s, it doesn’t take any commands with a period, for example
microk8s.enableandmicrok8s.kubectlwill result in an error no matter what comes after it, instead you have to specifymicrok8s enableandmicrok8s kubectl. I was able to enable dns, dashboard, ingress, istio, fluentd, storage, metallb, etc. What I had a hard time with is themicrok8s enable kubeflowbecause it always complained about thejuju controllerand installinghelm chartsresults in network connectivity problems. The microk8s works really well as a host. Thenetwork bridgeworks well as well as long as you follow enablevirtual boxas the driver and enter in a few commands from themultipass.runwebsite docs section.In the mean time, I find the best solution for using microk8s on a MAC is using Parallels with Ubuntu 20.04. My mac is performing really well as the
Kuberneteshost with multiple machines connecting in the cluster. Everything works including Kubeflow.