k3s/contrib/ansible
Avesh Agarwal 0d4851a4ef Ansible updates for Atomic. 2015-07-24 18:29:55 -04:00
..
group_vars Ansible: Add kube-ui kube-addon support 2015-07-24 09:58:31 -04:00
roles Ansible updates for Atomic. 2015-07-24 18:29:55 -04:00
vagrant Ansible: Vagrant: allow passing ansible tags to vagrant provision 2015-07-24 09:58:31 -04:00
.gitignore example ansible setup repo 2015-04-03 12:01:36 -04:00
README.md Ansible: Updating README 2015-07-24 09:58:31 -04:00
cluster.yml Declare etcd roles in meta rather then top level playbook 2015-06-24 17:07:12 -04:00
inventory Basic Generic File Cleanups 2015-06-24 13:45:46 -04:00
setup.sh Create, distribute, and use certificates for TLS and identity 2015-06-24 17:07:11 -04:00

README.md

Kubernetes Ansible

This playbook and set of roles set up a Kubernetes cluster onto machines. They can be real hardware, VMs, things in a public cloud, etc. Anything that you can connect to via SSH.

Before starting

  • Record the IP address/hostname of which machine you want to be your master (only support a single master)
  • Record the IP address/hostname of the machine you want to be your etcd server (often same as master, only one)
  • Record the IP addresses/hostname of the machines you want to be your nodes. (the master can also be a node)
  • Make sure your ansible running machine has ansible 1.9 and python-netaddr installed.

Setup

Configure inventory

Add the system information gathered above into the 'inventory' file, or create a new inventory file for the cluster.

Configure Cluster options

Look though all of the options in group_vars/all.yml and set the variables to reflect your needs. The options are described there in full detail.

Running the playbook

After going through the setup, run the setup script provided:

$ ./setup.sh

You may override the inventory file by doing:

INVENTORY=myinventory ./setup.sh

In general this will work on very recent Fedora, rawhide or F21. Future work to support RHEL7, CentOS, and possible other distros should be forthcoming.

Targeted runs

You can just setup certain parts instead of doing it all.

etcd

$ ./setup.sh --tags=etcd

Kubernetes master

$ ./setup.sh --tags=masters

kubernetes nodes

$ ./setup.sh --tags=nodes

flannel

$ ./setup.sh --tags=flannel

Analytics