Skip to content
A small collection of templates used to deploy Kubernets on CoreOS with theforeman
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.


You have to create a host parameter cloudconfig and insert the specific snippet name to use the different snippets with the same provisioning template. You can find the default CoreOS templates for foreman at github, which should be already included if you use foreman > 1.8.

Import templates

The easiest way to import these templates into your foreman is using foreman_templates.

I used a rake task for different prefix:

foreman-rake templates:sync repo="" prefix="k8s_" dirname="/kubernetes"

If you want to use different prefixes you have to adjust the names of the snippets.

Global host Parameters

  • kubernetes-binary-server: server which provides the Kubernetes binaries to download. Default is:
  • install-disk: e.g. /dev/sda
  • mirror-server: your mirror server if you don't want to download CoreOS every time you install a node
  • overlay_network: used by flannel.
  • ssh_authorized_keys: your ssh key(s) used to login into the nodes. You can specify multiple keys by separating them with a ,
  • k8s_release: Kubernetes release version which you like to deploy e.g. v.1.3.5

Adjust the CoreOS Template

Replace the <%= snippet 'coreos_cloudconfig' %> line 41 with this content (the spaces are important) or create a second template for this:

      <%= snippet @host.params['cloudconfig'] %>


With these snippets you can either deploy a standalone Kubernetes which means that all components of Kubernetes are running on one single node. One the the hand you can deploy a single master node which contains etcd + Kubernetes master components and as many minion nodes as you want.

kubernetes master_cloudconfig

This snippet installs a kubernetes-master which allows you to interact with Kubernetes and deploy your services.

Host parameters:

  • cloudconfig: k8s_master_cloudconfig

kubernetes minion_cloudconfig

This snippet installs a kubernetes-minion.

Host parameters:

  • cloudconfig: k8s_minion_cloudconfig
  • k8s_master: The Kubernetes master e.g. (without http:// this gets added automatically).

kubernetes standalone_cloudconfig

This snippet installs the kube-master and a kube-minion on the same node.

Host parameters:

  • cloudconfig: k8s_standalone_cloudconfig


For the deployment the following tools were used:

  • foreman_templates: This plugin will sync the contents of the Foreman Community Templates repository (or a git repo of your choice) to your local Foreman instance
  • Flannel: An overlay Network to support Kubernetes IP-per-Service.
  • Kubernetes: Container Cluster Manager.
  • CoreOS: Linux for Massive Server Deployments.
  • Cloud-validator: Useful tool for checking the syntax of your cloud-init
You can’t perform that action at this time.