Skip to content

Instantly share code, notes, and snippets.

@yifan-gu
Last active April 8, 2016 22:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save yifan-gu/091d258107f37ecdff48 to your computer and use it in GitHub Desktop.
Save yifan-gu/091d258107f37ecdff48 to your computer and use it in GitHub Desktop.
Hacking on rktnetes

Hacking on rktnetes (rkt + k8s integraton)

Get yifan's branch

This branch contains several pending PRs that is necessary for rkt as a container runtime. The branch is rebased on the master.

To checkout the branch

git remote add yifan-gu https://github.com/yifan-gu/kubernetes
git checkout -b gce_coreos_rkt yifan-gu/gce_coreos_rkt

Setup environments

In order to build/run the cluster with rkt container runtime. We need to specify some environments below:

export BUILD_PYTHON_IMAGE=true
export KUBE_GCE_ZONE=us-east1-b
export KUBE_OS_DISTRIBUTION=coreos

export KUBE_GCE_MASTER_PROJECT=coreos-cloud
export KUBE_GCE_MASTER_IMAGE=coreos-alpha-962-0-0-v20160218

export KUBE_ENABLE_NODE_LOGGING=false
export KUBE_ENABLE_CLUSTER_MONITORING=none

export KUBE_CONTAINER_RUNTIME=rkt
export KUBE_RKT_VERSION=rkt-1.2-dev-log

Also, we need to specify the instance/network prefix so that we won't step on each other's cluster:

export KUBE_GCE_INSTANCE_PREFIX=${SOME_PREFIX}
export KUBE_GCE_NETWORK=${KUBE_GCE_INSTANCE_PREFIX}

Build

After specifying the environments above, we can start building:

make quick-release

Launch a cluster

Launch a local cluster:

CONTAINER_RUNTIME=rkt RKT_PATH=$PATH_TO_RKT_BINARY NET_PLUGIN=kubenet hack/local-up-cluster.sh

Launch a GCE cluster:

cluster/kube-up.sh

For more information on how to debug rkt cluster, please see https://github.com/kubernetes/kubernetes/tree/master/docs/getting-started-guides/rkt#getting-started-with-your-cluster

@yifan-gu
Copy link
Author

Updated

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment