bundle-kubeflow icon indicating copy to clipboard operation
bundle-kubeflow copied to clipboard

Juju 3.x requires Microk8s snap install in strictly confinement (Doc bug)

Open selcem-artan opened this issue 1 year ago • 1 comments

Bug Description

Juju v3.1 installation was recommended with microk8s classic as per document "Tutorials" part. Microk8s should be installed in strictly confinement mode with snap command, for Juju 3.x compatibility.

To Reproduce

Install microk8s in classic, as per KubeFlow documentation

$ sudo snap install microk8s --classic --channel=1.26/stable

Configure default and commissioning distro series

$ juju version 3.1.7-genericlinux-amd64 $ sudo snap list microk8s Name Version Rev Tracking Publisher Notes microk8s v1.26.11 6236 1.26/stable canonical✓ classic $ juju bootstrap microk8s ERROR "/var/snap/juju/25751/microk8s/credentials/client.config" does not exist: juju "3.1.7" can only work with strictly confined microk8s

Environment

Juju v3.1, Microk8s v1.26

Relevant Log Output

Command output shared in Reproduce part

Additional Context

No response

selcem-artan avatar Feb 21 '24 09:02 selcem-artan

Thank you for reporting us your feedback!

The internal ticket has been created: https://warthogs.atlassian.net/browse/KF-5356.

This message was autogenerated

~$ juju version
3.5.2-genericlinux-amd64
~$ sudo snap list microk8s
Name      Version  Rev   Tracking     Publisher   Notes
microk8s  v1.29.4  6809  1.29/stable  canonical✓  classic
~$ juju clouds
Only clouds with registered credentials are shown.
There are more clouds, use --all to see them.
You can bootstrap a new controller using one of these clouds...

Clouds available on the client:
Cloud      Regions  Default    Type  Credentials  Source    Description
localhost  1        localhost  lxd   0            built-in  LXD Container Hypervisor
microk8s   0                   k8s   0            built-in  A local Kubernetes context
~$ juju bootstrap microk8s
ERROR "/var/snap/juju/27745/microk8s/credentials/client.config" does not exist: juju "3.5.2" can only work with strictly confined microk8s
~$

3.5.2 has same error

VinylStage avatar Jul 12 '24 07:07 VinylStage

Hello, i resolve this issue follow command. I'm not sure this solution is right, but works

sudo mkdir -p /var/snap/juju/current/microk8s/credentials
microk8s config | sudo tee /var/snap/juju/current/microk8s/credentials/client.config
sudo chown -R $USER:$USER /var/snap/juju/current/microk8s/credentials

VinylStage avatar Jul 21 '24 05:07 VinylStage

Thank you for reporting this. You are right. Updated getting started tutorial. If you see this in other places too, please feel free to re-open.

orfeas-k avatar Jul 22 '24 07:07 orfeas-k

Thank you for reporting this. You are right. Updated getting started tutorial. If you see this in other places too, please feel free to re-open.

I believe the setup with the command:

microk8s config | juju add-k8s my-k8s --client

breaks as soon as microk8s is restarted. Is there a way to get around this?

juju status
ERROR cannot connect to k8s api server; try running 'juju update-k8s --client <k8s cloud name>': starting proxy for api connection: connecting k8s proxy: Get "https://192.168.1.225:16443/api/v1/namespaces/controller-uk8sx/services/controller-service": dial tcp 192.168.1.225:16443: connect: no route to host

saeed68gm avatar Jan 26 '25 03:01 saeed68gm