![]() |
||
---|---|---|
.. | ||
README.md |
README.md
Run Kubernetes with rkt
This document describes how to run Kubernetes using rkt as a container runtime. We still have a bunch of work to do to make the experience with rkt wonderful, please stay tuned!
Prerequisite
-
systemd should be installed on your machine and should be enabled. The minimum version required at this moment (2015/05/28) is 215. (Note that systemd is not required by rkt itself, we are using it here to monitor and manage the pods launched by kubelet.)
-
Install the latest rkt release according to the instructions here. The minimum version required for now is v0.5.6.
-
Make sure the
rkt metadata service
is running because it is necessary for running pod in private network mode. More details about the networking of rkt can be found in the documentation.To start the
rkt metadata service
, you can simply run:$ sudo rkt metadata-service
If you want the service to be running as a systemd service, then:
$ sudo systemd-run rkt metadata-service
Alternatively, you can use the rkt-metadata.service and rkt-metadata.socket to start the service.
Local cluster
To use rkt as the container runtime, you just need to set the environment variable CONTAINER_RUNTIME
:
$ export CONTAINER_RUNTIME=rkt
$ hack/local-up-cluster.sh
After this, you can launch some pods in another terminal:
$ cluster/kubectl.sh create -f example/pod.yaml
CoreOS cluster on GCE
To use rkt as the container runtime for your CoreOS cluster on GCE, you need to specify the OS distribution, project, image:
$ export KUBE_OS_DISTRIBUTION=coreos
$ export KUBE_GCE_MINION_IMAGE=<image_id>
$ export KUBE_GCE_MINION_PROJECT=coreos-cloud
Then you can launch the cluster by:
$ kube-up.sh
```
Note that we are still working on making all containerized the master components run smoothly in rkt. Before that we are not able to run the master node with rkt yet.