strictly confined juju has broken cloud config

Bug #2039761 reported by Jordan Barrett
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Canonical Juju
Triaged
Low
Unassigned

Bug Description

I have the strictly confined Juju 4.0 snap (in a parallel install, if it's relevant). I'm trying to use this with k3s, but nothing is working because the strictly confined snap doesn't have permission to access k3s' KUBECONFIG file.
```
$ juju bootstrap k3s k3s
ERROR detecing local kube config clouds for k3s: reading local kubeconf: error loading config file "/etc/rancher/k3s/k3s.yaml": open /etc/rancher/k3s/k3s.yaml: permission denied
```

Even listing/removing clouds won't work:
```
$ juju_40 remove-cloud k3s
This operation can be applied to both a copy on this client and to the one on a controller.
No current controller was detected and there are no registered controllers on this client: either bootstrap one or register one.
ERROR detecting clouds for provider "kubernetes": detecing local kube config clouds: reading local kubeconf: error loading config file "/etc/rancher/k3s/k3s.yaml": open /etc/rancher/k3s/k3s.yaml: permission denied

$ juju_40 clouds
ERROR could not get local clouds: detecting clouds for provider "kubernetes": detecing local kube config clouds: reading local kubeconf: error loading config file "/etc/rancher/k3s/k3s.yaml": open /etc/rancher/k3s/k3s.yaml: permission denied
```

Revision history for this message
Jordan Barrett (barrettj12) wrote :

KUBECONFIG was pointing to a file that Juju can't access, so unsetting KUBECONFIG worked:
```
$ export KUBECONFIG=''
$ juju_40 clouds
Only clouds with registered credentials are shown.
...
```

However, Juju should probably ignore KUBECONFIG if it can't read the file, rather than causing a fuss.

Revision history for this message
Joseph Phillips (manadart) wrote :

Does it work if you use a directory under HOME and set K3S_CONFIG_FILE in your environment?

Changed in juju:
status: New → Triaged
importance: Undecided → Low
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.