Skip to content
This repository has been archived by the owner on Feb 24, 2020. It is now read-only.

library: launching rkt pods #1769

Open
philips opened this issue Nov 19, 2015 · 7 comments
Open

library: launching rkt pods #1769

philips opened this issue Nov 19, 2015 · 7 comments

Comments

@philips
Copy link
Contributor

philips commented Nov 19, 2015

We are working to integrate launching rkt pods inside of the kubelet. We should pull that code into a separate Go package such as github.com/coreos/rkt/launcher or something.

Here is the code in the kubelet:

https://github.com/kubernetes/kubernetes/blob/3847843160084cef0d471fd975244b8de354eab9/pkg/kubelet/rkt/rkt.go#L695

I can imagine having two potential modes for this API;

  • systemd mode which launches a service
  • double fork mode which daemonizes the rkt instance and uses the API service for destroy

Potential applications for this code:

  • Babysitter for the kubelet that checks the kubernetes version and launches the appropriate kubelet
  • Integration with the Amazon Elastic Container Engine agent.
  • Adding a "launch" endpoint to our API server
@philips
Copy link
Contributor Author

philips commented Nov 19, 2015

cc @yifan-gu @aaronlevy

@yifan-gu
Copy link
Contributor

Would vote for something like a rkt kill(#1496)
to stop the pod in a double fork mode. I'd like to defer the API service being root. cc @vcaputo @jonboulle

@yifan-gu
Copy link
Contributor

But we can do a systemd mode first. This should help clean up the kubelet/rkt code as well.

@yifan-gu yifan-gu self-assigned this Nov 19, 2015
@philips
Copy link
Contributor Author

philips commented Nov 19, 2015

@yifan-gu Agreed, I want non-root API service too. Maybe it is two different things.

@ranjib
Copy link

ranjib commented Feb 24, 2016

I am actively looking for such library. I was in the rkt community sync, where I learned gRPC is not an option because it is not intended (i dont know why? ), but if cli + systemd mode is preferred way to go, then be it, but having this in a go library be easier to maintain and upgrade across the schedulers, builders and all the tools to come. If someone is working on this, I can help testing/bug fixing, if not and you folks are willing to take such contribution, I can work on extracting bits from the kubernetes/nomad driver, acbuild etc.

@yifan-gu
Copy link
Contributor

@ranjib SGTM. Currently I am not able to work on that yet. Feel free to hack on it, patches are definitely welcome :)

@yifan-gu
Copy link
Contributor

yifan-gu commented May 4, 2016

Captured the discussion today from the rkt/appc sync.
Currently, the rkt shell out from kubelet include:
Rkt fetch
Rkt image rm
Rkt prepare
Rkt enter
Rkt run (Not necessary shelled out by kubelet, it's the value of the ExecStart int the systemd unit generated by kubelet)
Rkt gc

Journalctl -m (get logs) #2041

Other things that require kubelet to shell out:
Systemctl reset-failed (in garbage collection, should be able to be replaced by dbus.ResetFailedUnit() https://godoc.org/github.com/coreos/go-systemd/dbus#Conn.ResetFailedUnit)
Systemctl --version @philips I didn't find anything in go-systemd to get the version?

cc @tmrts

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

No branches or pull requests

4 participants