-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
localkube: add rkt support #511
Conversation
Thanks for your pull request. It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). 📝 Please visit https://cla.developers.google.com/ to sign. Once you've signed, please reply here (e.g.
|
1 similar comment
Thanks for your pull request. It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). 📝 Please visit https://cla.developers.google.com/ to sign. Once you've signed, please reply here (e.g.
|
Can one of the admins verify this patch? |
CLAs look good, thanks! |
1 similar comment
CLAs look good, thanks! |
Nice! Looks like you need to run Will take a detailed look today. |
@minikube-bot ok to test |
Could we use rkt with the |
Note to myself: rkt does not seem to detect overlay in |
@dlorenc short question: Is there a specific reason why |
I don't think there's any specific reason, we erred on the side of putting everything in tmpfs at the start. This makes it slightly more likely a broken setup will work after a reboot :) Would it help any to move /var/lib/kubelet to the persistent disk? Maybe for the plugins? |
progress today:
|
@euank sure, that's possible, this will have to be hard-coded though here in minikube, since this is not "default" behavior. |
Current coverage is 32.37% (diff: 52.38%)@@ master #511 diff @@
==========================================
Files 44 44
Lines 1859 1878 +19
Methods 0 0
Messages 0 0
Branches 0 0
==========================================
+ Hits 599 608 +9
- Misses 1138 1146 +8
- Partials 122 124 +2
|
@dlorenc I see |
Hey @s-urbaniak, this code looks reasonable to me. A few questions: Is it possible to support both runtimes on the same node, or does the kubelet only support one? Would it be possible for us to use your new ISO all the time, or does it cause trouble with the standard Docker runtime? |
@dlorenc Only a single container runtime may be configured for a given kubelet (though a cluster may be mixed, since this cluster is only one node it can't be). I believe the ISO in question does include the docker daemon and work with it as well now. For making it the defualt, a quick size and boot-time comparison might be cool to have! @s-urbaniak I'm still 👍 for cni for rkt (and docker too should be fine unless someone has a reason not to); I know it's not the default behaviour but it's the better behaviour. |
Looking through the buildroot config, filed one issue so far: https://github.com/coreos/minikube-iso/issues/1 |
Status update:
I will prepare a size/boot time comparison next week. @dlorenc we could use the minikube ISO all the time. I am testing docker in parallel with rkt. |
@s-urbaniak superb! |
@s-urbaniak thanks again for the help here! I haven't used buildroot before, but I'm trying to follow the tutorial now. Would you be willing to send me a description of how you generated that config? A gist or email would work. |
@dlorenc nearly there, only CNI is missing. I uploaded another ISO https://github.com/coreos/minikube-iso/releases/tag/v0.0.2 having today's rkt v1.14.0 release, and 9P kernel modules. I also added some more instructions in https://github.com/coreos/minikube-iso#hacking on how to change the buildroot/kernel config. |
@dlorenc I added CNI support, which can be enabled using So what do you think, could we land this? |
@euank /cc I made minikube configurable to use |
Nice! Yeah, let's get this going :) I'd like to move the iso code into our tree at some point, but we can do that later. I'll make a final pass on this today. |
this is looking cool, thanks @s-urbaniak! |
This LGTM, though I'm not super familiar with the docker-machine/provisioner bits so I couldn't really review that part well. |
@@ -29,7 +29,7 @@ var stopCommand = "sudo killall localkube || true" | |||
|
|||
var startCommandFmtStr = ` | |||
# Run with nohup so it stays up. Redirect logs to useful places. | |||
sudo sh -c 'PATH=/usr/local/sbin:$PATH nohup /usr/local/bin/localkube %s --generate-certs=false --logtostderr=true --node-ip=%s > %s 2> %s < /dev/null &' | |||
sudo sh -c 'PATH=/usr/local/sbin:$PATH nohup /usr/local/bin/localkube %s --network-plugin=%s --container-runtime=%s --generate-certs=false --logtostderr=true --node-ip=%s > %s 2> %s < /dev/null &' |
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.
Would you mind only inserting these new flags if the user has set them?
We have some alpha builds of localkube published that will crash if these flags are passed. See #512 for the bug tracking the main issue.
If this makes the formatting get a bit unwieldy it might be a good idea to switch to a text/template.
Just one nit about flag passing. |
@dlorenc addressed the review comment, PTAL. |
👍 |
LGTM thanks! |
This enables other container runtimes in minikube. While the changes here are pretty small, a bigger effort was to create an ISO that contains docker, rkt, and systemd, being ~67MB in size.
The https://buildroot.org/ based config for that image is available here: https://github.com/coreos/minikube-iso. I can include those configs in-tree in this PR too.
We are also investigating a "CoreOS-slim" based ISO image which could replace the aforementioned buildroot ISO, but as long as that is not available we could go with this solution first.
What I did for testing locally was to start minikube as follows (after building my PR branch):
/cc @dlorenc This PR also introduces more than I envisioned initially ;-) I added a small provisioner for the buildroot based "minikube" image, and the ISO image includes docker as well.
TODOs:
/var/lib/kubelet
Fixes #168