When bootstrapping microk8s (microk8s channel 1.15/stable, juju latest 2.7.x),
if the local user did not add himself in the microk8s group, then juju bootstrap fails with only one word: ERROR.
ubuntu@stable-murrelet:$ juju bootstrap microk8s microk8s
ERROR
ubuntu@stable-murrelet:$ juju bootstrap microk8s microk8s --debug
13:57:54 INFO juju.cmd supercommand.go:83 running juju [2.7.6 gc go1.10.4]
13:57:54 DEBUG juju.cmd supercommand.go:84 args: []string{"/snap/juju/11454/bin/juju", "bootstrap", "microk8s", "microk8s", "--debug"}
13:57:55 INFO juju.util.exec exec.go:209 run result: exit status 1
13:57:55 DEBUG juju.kubernetes.provider detectcloud.go:41 failed to query local microk8s:
ERROR
13:57:55 DEBUG cmd supercommand.go:519 error stack:
/build/juju/parts/juju/go/src/github.com/juju/juju/caas/kubernetes/provider/builtin.go:69:
/build/juju/parts/juju/go/src/github.com/juju/juju/cmd/juju/commands/bootstrap.go:1024:
/build/juju/parts/juju/go/src/github.com/juju/juju/cmd/juju/commands/bootstrap.go:976:
/build/juju/parts/juju/go/src/github.com/juju/juju/cmd/juju/commands/bootstrap.go:562:
ubuntu@stable-murrelet:$ newgrp microk8s
ubuntu@stable-murrelet:$ juju bootstrap microk8s microk8s
Creating Juju controller "microk8s" on microk8s/localhost
...
It would be helpful to add some verbose to this bug (lack of permissions, etc.)
Hi Camille
What's your juju version?
I tested on 2.7 and 2.8, Juju does print error messages.
ubuntu@test1:~$ sudo snap install juju --channel 2.7/stable --classic
juju (2.7/stable) 2.7.6 from Canonical✓ installed
ubuntu@test1:~$ juju bootstrap microk8s microk8s
ERROR Insufficient permissions to access MicroK8s.
You can either try again with sudo or add the user ubuntu to the 'microk8s' group:
sudo usermod -a -G microk8s ubuntu
sudo chown -f -R ubuntu ~/.kube
The new group will be available on the user's next login.