Microk8s on mac m1 (or alternative)

Hi,
I have some tutorials for our project ‘Egeria’ that are based on use of a Helm chart. These may well be run by ‘newbies’ who may not know k8s or be up to speed on the different implementations.

The current docs refer to microk8s, which is working well on windows/linux/macos x86_64, but is problematic on apple silicon (arm).

At this point I don’t have access to an m1 system myself :frowning:

I see multipass recently got updated to support m1 . Would we expect to see arm support soon do you think? Are there viable workarounds yet to get anything running?

Also, even when we do have something, am I going to have challenges with the x86_64 container images? Or is emulation going to be problematic? Will we need arm native images?

I ask since if not I probably need to figure out an alternative plan… especially as we have some new classes running in Jan.

I have considered

  • rancher desktop – no sign of m1 yet?
  • minikube - depends on docker desktop? (we need to avoid this for licensing reasons… it’s possible only the open components are needed?)
  • kind - perhaps running in podman - but podman itself is still a little problematic, plus may still have an architecture issue for the containers
  • virtualbox, parallels etc - not sure of the state of these, and incur ££

Any other ideas? I’m looking for something not too complicated, given the likely huge variety of skill levels of the attendees

Not sure if I understand your problem, but I am assuming that you need to provide some Kubernetes cluster “for newbies” that is able to run on M1-based Macs.

Not having an M1- Mac myself, I am not sure if K3s may be a valid option for your scenario, but may be worth to take a look at https://k3s.io/ (and even GitHub - alexellis/k3sup: bootstrap Kubernetes with k3s over SSH < 1 min 🚀, by Alex Ellis to create multi-node clusters based on K3s).

K3s provides a single-node Kubernetes cluster; it provides out-of-the-box support for Helm, which may be a +1 in your scenario.

ARM-based Kubernetes cluster do need ARM-based container images. You may create multi-architecture container images using the “buildx” command in Docker (see Documentation – Arm Developer)

Hope it helps,

Xavi

Hi @planetf1

We addressed the issues MicroK8s had with M1. You can give it a try now, it works as expected.

On ARM machines you will need ARM images. I do not think there is a way around this.

I think MicroK8s is a good fit for your use-case. You get the same UX in all platforms (Linux native, Multipass based on Windows and Mac) and installing helm is as easy as microk8s enable helm3.

Feel free to share more info on the work you are doing with MicroK8s. We may be able to promote it.

Cheers.

Getting this error on installing microk8s in Mac M1 using brew. How to set Python. I am new to Mac.

brew install ubuntu/microk8s/microk8s

fatal: Could not resolve HEAD to a revision

Warning: No available formula with the name “python” (dependency of ubuntu/microk8s/microk8s).

==> Searching for similarly named formulae…

Error: No similarly named formulae found.

==> Searching for a previously deleted formula (in the last month)…

Error: No previously deleted formula found.

==> Searching taps on GitHub…

Error: No formulae found in taps.

Hey there and happy new year!

Are you still seeing this issue? I have tried this on our M1 test hardware today and it’s working fine. Could you please run brew doctor and see if you have any issues with brew?

Many thanks.

PFB the command tried.

brew doctor
Please note that these warnings are just used to help the Homebrew maintainers
with debugging if you file an issue. If everything you use Homebrew for is
working fine: please don’t worry or file an issue; just ignore this. Thanks!

Warning: Homebrew/homebrew-core was not tapped properly! Run:
rm -rf “/opt/homebrew/Library/Taps/homebrew/homebrew-core”
brew tap homebrew/core

Warning: Some taps are not on the default git origin branch and may not receive
updates. If this is a surprise to you, check out the default branch with:
git -C $(brew --repo homebrew/core) checkout master

Thank You

Thanks for the reply. Have you tried to run the suggestions? I believe this is where your issues are coming from, not the MicroK8s repo.

Hello Guys;

Contributing to the problem you have when installing mk8s on MAC.
I tell you what to do and the problem is solved

jasar@MacBook-Air-de-Juan ~ % brew install ubuntu/microk8s/microk8s
Warning: No available formula with the name “python” (dependency of ubuntu/microk8s/microk8s).
==> Searching for similarly named formulae…
Error: No similarly named formulae found.
==> Searching for a previously deleted formula (in the last month)…
Error: No previously deleted formula found.
==> Searching taps on GitHub…
Error: No formulae found in taps.

We execute the following;

#rm -rf “/opt/homebrew/Library/Taps/homebrew/homebrew-core”
#brew tap homebrew/core
#git -C $(brew --repo homebrew/core) checkout master

Subsequently, the command is executed again and you must start downloading

#/bin/bash -c “$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)”

==> Checking for sudo access (which may request your password)…

Password:

==> This script will install:

/opt/homebrew/bin/brew

/opt/homebrew/share/doc/homebrew

/opt/homebrew/share/man/man1/brew.1

/opt/homebrew/share/zsh/site-functions/_brew

/opt/homebrew/etc/bash_completion.d/brew

/opt/homebrew

Press RETURN to continue or any other key to abort:

==> /usr/bin/sudo /usr/sbin/chown -R jasar:admin /opt/homebrew

==> Downloading and installing Homebrew…

HEAD is now at 472edc06e Merge pull request #12943 from Homebrew/update-man-completions

==> Installation successful!

==> Homebrew has enabled anonymous aggregate formulae and cask analytics.

Read the analytics documentation (and how to opt-out) here:

Anonymous Aggregate User Behaviour Analytics — Homebrew Documentation

No analytics data has been sent yet (nor will any be during this install run).

==> Homebrew is run entirely by unpaid volunteers. Please consider donating:

==> Next steps:

  • Run these two commands in your terminal to add Homebrew to your PATH :

echo ‘eval “$(/opt/homebrew/bin/brew shellenv)”’ >> /Users/jasar/.zprofile

eval “$(/opt/homebrew/bin/brew shellenv)”

  • Run brew help to get started

  • Further documentation:

Ready…

Regards