Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Snap stable version unable to update kube config in home dir #185

Open
HontoNoRoger opened this issue Feb 1, 2023 · 3 comments
Open

Snap stable version unable to update kube config in home dir #185

HontoNoRoger opened this issue Feb 1, 2023 · 3 comments

Comments

@HontoNoRoger
Copy link

The stable version v0.0.25-7-g0efe989 of kubelogin from Snapcraft does not have access to ones home directory, therefore is unable to update ones kubeconfig:

kubelogin convert-kubeconfig -l azurecli --kubeconfig ~/.kube/config
Error: unable to load kubeconfig: error loading config file "/home/companyname/myusername/.kube/config": open /home/companyname/myusername/.kube/config: permission denied

ll ~/.kube/config
-rw------- 1 myusername myusername 31377 Feb  1 13:49 /home/companyname/myusername/.kube/config

cat /etc/apparmor.d/tunables/home.d/snap-homedirs
@{HOMEDIRS}+=/home/companyname

It is not blocked by apparmor or anything as we extend the basic homedirs to our subfolder hierarchy.
Maybe only connections for accessing the home dir is required on the snap as the confinement is strict?
Tested on Ubuntu 20.04.

@HontoNoRoger
Copy link
Author

Not using --kubeconfig ~/.kube/config will just terminate the command without error, but it also didn't change the file. Probably it expects one inside the confined file space of the snap, not being able to find one and completing silently.

@weinong
Copy link
Contributor

weinong commented Feb 3, 2023

ack'ed. I repro'ed it on my ubuntu vm.

@weinong
Copy link
Contributor

weinong commented Feb 3, 2023

#186

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants