Hybrid setup for multi-node Kubernetes

I wanted latest kubernetes to try out new features. But then there are no latest packages of kubernetes available for fedora as of now. So alternative was to try out the released binaries. But I wanted a kubernetes that runs on docker and is multi-node setup. I also read the docs which tells how to setup multi-node kubernetes on docker. But then it was not working for me for some reason.


Also may be due to complexity of running bootstrap instance of docker daemon, then setting up flannel and etcd which run in its own containers, which somehow messed up with my default gateway interface, causing me to restart the VMs, very often.


The docs ask you to run etcd 2.2.1 and flannel 0.5.5 in container, so when I checked with the fedora repos those were available as packages. So I decided to install etcd and flannel as rpm package and run only kubernetes in containers. So this reduced complexity.


I have written some shell scripts that do following (link to scripts github repo):

  1. Bring up three VMs using vagrant one acts as master and other are nodes (you can add more nodes to Vagrantfile).
  2. Install required packages viz. docker, flannel, etcd(only on master).
  3. Setup etcd and flannel.
  4. Make changes to systemd file of docker to use flannel as default network.
  5. Change SELINUX contexts of folders that are mounted on container running kubernetes.
  6. Finally pull kubernetes as container image. (More info k8s docs for master, k8s docs for node)




3 thoughts on “Hybrid setup for multi-node Kubernetes

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s