-
Notifications
You must be signed in to change notification settings - Fork 699
Add usernetes with docker example #2012
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
Conversation
It is possible to run this example with podman, by changing some variables.
|
kind: ClusterConfiguration | ||
+apiServer: | ||
+ certSANs: | ||
+ - "127.0.0.1" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we us yq?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Need to install it.
$ yq
Command 'yq' not found, but can be installed with:
snap install yq
Please ask your administrator.
@afbjorklund how are you handling creating the join-command here (and sharing with a worker?) I'm trying to get that working for my setup, and it seems like the mounts are not done until the provision is done (so I can't write content there) and there doesn't seem to be a copy directive for into the build. I found limactl copy but that assumes both are running (and I'd like the second to provision with the file) https://fig.io/manual/limactl and I found this issue #594 but it wasn't clear that there was a resolution. Thanks for the tips! |
This is true for |
Is there an example that shows how to do this? And so I understand, the reverse sshfs is like a network filesystem (using ssh) and then the others are different kinds of filesystems? I found:
|
Lines 101 to 104 in a21b5f3
|
I did not, it was something that was left-do-do also for the regular rootful Kubernetes... I think it will most likely involve a lima wrapper, with appropriate "hooks" in the scripts? But this is using docker compose, so that would be an alternative (e.g. using a volume) For regular kind, you would just ask for another node in the config file (in the yaml)... |
https://wiki.qemu.org/Documentation/9psetup You can also search for "VirtFS", the qemu setup: But yeah, it is the same old Plan 9 transport... |
Note: we scoped out the regular kind and k3d templates, and left it as an exercise for the reader So we could do the same with usernetes, and just refer to "docker.yaml" (rootless) as the base? Especially if the script grows any longer (like k8s) |
1d59582
to
078a093
Compare
For those following the thread about virtio-fs - I found that the C variant that shipped with QEMU did not work. So I built the rust one, e.g., # This is in the PWD
git clone https://gitlab.com/virtio-fs/virtiofsd
cd virtiofsd
sudo apt install libcap-ng-dev libseccomp-dev Then build with cargo. cargo build --release Then I replaced it.
I also did:
And then I was able to copy the join-command (or whatever files I needed) into the mount directory and they will be present when you are provisioning! mkdir -p /tmp/lima
cp /home/vanessa/.lima/control-plane/join-command /tmp/lima/join-command @afbjorklund @jandubois I removed my home |
I'm not sure what you mean by "it shells in". In general you can specify the working directory with But I'm not sure if this applies to your situation as I'm not clear about what "it" means... |
This works great! limactl shell --workdir /opt/usernetes usernetes-worker that should work for now. Thank you! |
Thanks for the help! I now have a worker and control plane set of configs, and it's entirely automated except for copying the join-command to the (TBA worker) directory that is mounted and available for provision, and then for actually running join I have the user do that interactively because otherwise there is an issue with containerd. But overall it's just a few commands and very easy, and that's great! Thanks for all the help! https://github.com/converged-computing/usernetes-lima |
078a093
to
40f93c3
Compare
Added a very important It would be nice if usernetes used something like EDIT: well, something rootless (not /etc) Guess it will just be something in home. |
40f93c3
to
f8e9abd
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks
To access the control-plane (which is normally not needed, but whatever) one can do:
And like it says in the README, you need to edit the compose.yaml in order to add node ports. But when you do, they are also forwarded by Lima... |
Will run Kubernetes in rootless docker, a.k.a. "usernetes". Add certificate for localhost so we can use it from the host. Signed-off-by: Anders F Björklund <anders.f.bjorklund@gmail.com>
9517d2a
to
6ade5ae
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks
Will run Kubernetes in rootless docker, a.k.a. "usernetes".
https://github.com/rootless-containers/usernetes
https://rootlesscontaine.rs/getting-started/docker
Add certificate for localhost so we can use it from the host.
Note: This is running kubernetes-in-docker (kind)
Currently:
FROM docker.io/kindest/node:v1.28.0