Fleet Unit Files for Kubernetes on CoreOS
Jun 27 2015As I’ve been leveraging CoreOS more and more for running docker containers, the limitations of Fleet have become apparent.
Despite the benefits of dynamic unit files via the Fleet API there is still a need for fine-grained scheduling, discovery, and more complex dependencies across containers. Thus I’ve been exploring Kubernetes. Although young, it shows promise for practical usage. The Kubernetes repository has a plethora of “getting started” examples across a variety of environments. There are a few CoreOS related already, but they embed the kubernetes units in a cloud-config file, which may not be what you want.
My preference is to separate the CoreOS cluster setup from the Kubernetes installation. Keeping your CoreOS cloud-config minimal has many benefits, especially on AWS where you can’t easily update your cloud-config. Plus, you may already have a CoreOS cluster and you just want to deploy Kubernetes on top of it.
The Fleet Unit Files for Kubernetes on CoreOS are on GitHub. The unit files makes a few assumptions, mainly you are running with a production setup using central services. For AWS you can use Cloudformation to manage multiple sets of CoreOS roles as distinct stacks, and join them together via input parameters.