Spin up a Kubernetes 1.5 cluster on CentOS virtual machines
Shell
Latest commit 6ab8265 Feb 20, 2017 dougbtv [docs][readme][minor]
Permalink
Failed to load latest commit information.
docs [docs] primarily docs for how-to Feb 16, 2017
inventory [flannel][significant] adds flannel, currently as default option Feb 17, 2017
roles
vars
.gitignore initial commit Feb 15, 2017
README.md [docs][readme][minor] Feb 20, 2017
kube-install.yml initial commit Feb 15, 2017
kube-teardown.yml
multus-cni.yml [multus] multus needs to be present on all minions and master Feb 17, 2017
virt-host-setup.yml initial commit Feb 15, 2017
vm-teardown.yml [vm-teardown] new playbook to teardown vms Feb 17, 2017

README.md

kube-centos-ansible

Install kubernetes 1.5 on a cluster of CentOS VMs, including CNI pod networking (defaults to Flannel, also supports Weave, and looks to other plugins for future versions).

Want some more detail?

This document is... Kind of terse. Want a complete walkthrough? Check out my blog article detailing how to get it going from scratch.

Playbooks

Playbook Inventory Purpose
virt-host-setup.yml ./inventory/virthost.inventory Provision a virtual machine host
kube-install.yml ./inventory/vms.inventory Install and configure a k8s cluster
kube-teardown.yml ./inventory/vms.inventory Runs kubeadm reset on all nodes to tear down k8s
vm-teardown.yml ./inventory/virthost.inventory Destroys VMs on the virtual machine host
multus-cni.yml ./inventory/vms.inventory Compiles multus-cni

(Table generated with markdown tables)

Usage

Step 1. Modify ./inventory/virthost.inventory to setup a virt host (skip to step 2 if you already have an inventory)

ansible-playbook -i inventory/virthost.inventory virt-host-setup.yml 

Step 2. Modify ./inventory/vms.inventory Setup kube on all the hosts. If you used step 1, towards the end of the output there there will be hints on which IPs for each VM created.

ansible-playbook -i inventory/vms.inventory kube-install.yml

Want more VMs? Edit the ./vars/all.yml and add them to the list (and then later to your inventory in step 2)

About

Initially inspired by: