-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Can't run KIND on ChromeOS Linux VM #763
Comments
We need to do that remount. There is also a previous bug for this. I don't think kind will work inside the chromeOS sandbox at the moment. |
Permission is denied because this command line is missing flags related to that (which kind will include). If you run kind with --loglevel=debug you can see more detail including this command. |
sys
Thanks for the fast response, sorry for missing the other bug. Do we know
if this is the last remaining blocker for Chrome OS? And is there a bug
assigned to Chrome OS?
…Sent from my phone
On Fri, 9 Aug 2019, 11:30 am Benjamin Elder, ***@***.***> wrote:
We need to do that remount.
There is also a previous bug for this. I don't think kind will work inside
the chromeOS sandbox at the moment.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#763?email_source=notifications&email_token=AE43PZDDKRT5ZXNF5SWEMPLQDWES7A5CNFSM4IKVC4MKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD37ADNI#issuecomment-519963061>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AE43PZBOERWT6PVTZHUEVE3QDWES7ANCNFSM4IKVC4MA>
.
|
We don't know what the blocker is yet, and I don't have access to a setup suitable for testing this. The existing bug doesn't have enough details either. This may not even be considered a bug on their end. Kubernetes / the container runtimes need relatively elevated permissions to run at the moment, I suspect the sandbox is too secure :+) |
Re #462: I did see that bug but I thought this was something different. My computer successfully got past the "preparing nodes" step but died on the next "Creating kubeadm config" step. Can I provide any more details that would help with this? Agreed that there's a chance ChromeOS won't want to "fix" this but I'm motivated to push on it a bit :) Here's the result of the debug logs:
I'll try to reproduce this more precisely. |
Running the
|
How was docker installed? |
I followed the instructions for Docker-on-Pixelbook (basically
I have no idea. AFAIK it's stock ChromeOS but it's managed by my employer (Google) so they may have some additional stuff on it.
I can do a bind mount, yes:
My VM and container don't have any block devices other than
Yup:
|
Hey, I am highly interested in getting this working on ChromeOS (I raised the original ticket reference https://bugs.chromium.org/p/chromium/issues/detail?id=878034). Thanks very much for the tips regarding debugging - very helpful. I plan to investigate a bit more over the coming weekend. My thoughts at the moment relate to the container being restricted on the accessible ports available to Crostini. K8s ports are not on the existing list of default ports. I believe you can enable them, so it might be trial and error for this to work. Beyond that there is also the use of a privileged container - which I understood was not supported on Crostini? This is more of an issue and one which I do not think will be enabled due to security concerns. |
Hi! 👋
you can configure kind to use a particular port with apiVersion: kind.sigs.k8s.io/v1alpha3
kind: Config
networking:
apiServerPort: 6443
That's a bit more of a blocker. Each kind "node" docker container is It might be possible to hack up kind to use usermode Linux instead but that's going to be fairly involved. If I read the logs from @adrianludwin correctly though, we actually manage to create those containers, but it fails once we try to use * (changing |
dupe: #1137 I don't really have the capacity to dig into this further at the moment, and I don't think any of our other usual contributors do. AFAICT, the chromeOS sandbox is too restrictive to run Kubernetes. This is probably generally a good thing 🙃 as kind is certainly not the most secure thing to be doing, but there's not much we can do here. At this point I'm going to recommend that we add this to known issues and close out this bug in favor of the upstream chromeOS issue. |
If I understand correctly, that upstream bug is targetting minikube (rather than kind specifically) and also it might be ... done/terminal/finished/closed?
|
I don't know if the upstream bug is actually fixed, but if you read through the comments the upstream bug expands to more generally trying to run some form of kubernetes-like-thing including kind, minikube, k3s... kind is not doing anything special for operating systems otherwise, we only require privileged docker containers and whatever kernel features kubernetes requires. |
See some more background on |
Can this be closed now? Notes regarding ChromeOS were added in #1138 - I don't think there is much more that can be done from the kind side of things unless or until changes are made to ChromeOS to enable this. |
Yeah, the crostini sandbox is too locked down. That makes sense really, Kubernetes is also for managing Linux and uses many privileged kernel APIs |
FYI - ChromeOS supports minikube. I havent tried Kind, so not sure if this works. I wrote how to run Minikube here https://richrose.dev/posts/chromeos/productivity/chromeos-minikube/ |
Thanks for sharing @rosera Sounds promising...will give it a whir and report back... |
thanks @rosera, cross posting this at kubernetes/minikube#6411
KIND doesn't use VMs (it uses container nodes), but if you can create arbitrary VMs you could create a VM to run kind in. |
Thanks for sharing @rosera . I am going to try what you have shared. Can you share more details about your environment? e.g. we should perform all commands on ChromeOS/crostini/debian (or ubuntu? 20.04?) |
I used ChromeOS debian (Crostini) environment, no additional changes were required. I used a Pixelbook i7 16Gb and a Asus CN60 i7 16Gb to test. I posted the blog post over a year ago, so may require some changes? |
@rosera it fails at my chromebook (Debian 11): ❌ Exiting due to GUEST_PROVISION: Failed to start host: driver start: error creating VM: virError(Code=38, Domain=0, Message='Unable to set XATTR trusted.libvirt.security.dac on /var/lib/libvirt/qemu/domain-4-minikube/master-key.aes: Operation not permitted') ╭───────────────────────────────────────────────────────────────────────────────────────────╮ |
oh, it works after changing the /etc/libvirt/qemu.conf and rebooting the chrome book! Thanks @cbandy ! |
If you can get an arbitrary VM running you should be able to run docker or podman + kind inside that using the usual linux install etc. 👀 |
Thanks @keyonjie I updated my blog with the additional steps. |
I would like to inform you I can run KinD on ChromeOS: either with docker or with podman (running from root). First I enabled nesting mode for LXC container: it is requirement for Docker on ChromeOS. After vmc launch termina
lxc config set penguin security.nesting true
lxc restart penguin Then: cat > cluster.yaml << END
kind: Cluster
apiVersion: kind.x-k8s.io/v1alpha4
featureGates:
KubeletInUserNamespace: true
END
kind create cluster --config cluster.yaml The reason why KinD fails is LXC container misses some devices (/dev/kmsg, /dev/mapper/control) then kubelet panics. Also rootless setup doesn't work because either it doesn't have bridge-nf-call-iptables or cgroups v2. I think it is not a problem if KubeletInUserNamespace is used and docker or podman are started from root. |
xref: #3101 |
@dex4er this doesn't seem to work for debian 12 bookworm crostini, is there a new trick that needs to be enacted?
To verify the nesting in vmc:
And finally, attempting to create a cluster:
Thoughts? Thank you in advance! |
@maxamillion I'm sorry. It works for me: very fresh ChromeOS with bookworm (fresh install, not an upgrade) with Docker 24.0.7 and kind v0.20.0:
You can try
|
What happened: I tried to run
kind
(v0.4.0) on the Linux VM in Chrome OS 75.0.3770.144:Based on the error and a quick look at the source code, I decided to try to run
kindest/node
manually, and got the following result:I suspect (but have not tried to confirm) that this comes from the following lines in
images/base/entrypoint
:What you expected to happen: Cluster gets created.
How to reproduce it (as minimally and precisely as possible):
If my suspicion that the problems is in the entrypoint is correct,
docker run kindest/node:v1.15.0 -it /bin/bash
should be sufficient. If that's wrong,kind create cluster
reliably reproduces.Anything else we need to know?:
Environment:
The text was updated successfully, but these errors were encountered: