question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

MacOS: Microk8s failing to enable kubeflow

See original GitHub issue

Hi there,

Right after a fresh install of MicroK8s, enable kubeflow fails


==> /usr/local/Cellar/microk8s/2.0.1/libexec/bin/pip install -v --no-deps --no-binary :all: --ignore-installed /private/tmp/microk8s--wheel-20201123-5266-1tpceaz/wheel-0.34.2
==> /usr/local/Cellar/microk8s/2.0.1/libexec/bin/pip install -v --no-deps --no-binary :all: --ignore-installed /private/tmp/microk8s-20201123-5266-1quxj6/microk8s-installer-v2.0.1/installer
🍺  /usr/local/Cellar/microk8s/2.0.1: 1,460 files, 13.9MB, built in 31 seconds
ddurand@macbook049 ~ % microk8s enable kubeflow
This command can't be run as root.
Try `microk8s enable kubeflow` instead.
Failed to enable kubeflow
An error occurred when trying to execute 'sudo microk8s.enable kubeflow' with 'multipass': returned exit code 1.
ddurand@macbook049 ~ % 

IIRC, when I enable kubeflow on Ubuntu I can do it with sudo otherwise I get a similar failure. It requires to be executed under a standard user. Maybe something similar here ?

Didier

Issue Analytics

  • State:open
  • Created 3 years ago
  • Reactions:3
  • Comments:18 (2 by maintainers)

github_iconTop GitHub Comments

9reactions
ktsakalozoscommented, Nov 23, 2020

Hi @didier-durand,

You are right, this is a bug. The kubeflow addon expects the user to be in the microk8s group or it will fail with This command can't be run as root.. The microk8s OS native client executes all microk8s commands as root with sudo.

Here is a workaround, get a shell in the microk8s VM:

multipass shell microk8s-vm

Enable kubeflow by adding the user to the microk8s group:

sudo usermod -a -G microk8s $USER"
sudo chown -f -R $USER ~/.kube"

Restart the VM. Get a new shell and enable kubeflow:

multipass shell microk8s-vm
microk8s enable kubelfow
4reactions
maxisacodercommented, May 7, 2021

still not work

Read more comments on GitHub >

github_iconTop Results From Across the Web

MacOS: Microk8s failing to enable kubeflow #1763 - GitHub
You are right, this is a bug. The kubeflow addon expects the user to be in the microk8s group or it will fail...
Read more >
Unable to enable kubeflow on macOS: "This command can't ...
Hello, I'm attempting to run Kubeflow on MicroK8s on macOS ... Unable to enable kubeflow on macOS: "This command can't be run as...
Read more >
Troubleshooting - MicroK8s
Single command install on Linux, Windows and macOS. Made for devops, great for ... I get "Unable to connect to the server: x509"...
Read more >
microk8s disable kubeflow file disable.kubeflow.sh errors
Re-install the tip version of MicroK8s with sudo snap install microk8s --classic --channel=edge , and re-enable the Kubeflow add-on. https://www ...
Read more >
Install MicroK8s on macOS - Tutorials - Ubuntu Community Hub
Key Value Summary Get a local Kubernetes on MacOS with Microk8s and Multipass. ... Hi, trying to install microk8s and enable Kubeflow on...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found