k3s/contrib/ansible
Zach Loafman acf6fc6e24 Merge pull request #10627 from eparis/total-ansible
Ansible: Get DNS working - Add kubectl kubeconfig file
2015-07-01 16:07:53 -07:00
..
group_vars Hide DNS variables away from the user 2015-06-30 13:05:59 -04:00
roles Merge pull request #10627 from eparis/total-ansible 2015-07-01 16:07:53 -07:00
vagrant Changing CentOS install of master and nodes 2015-06-25 18:45:49 -07:00
.gitignore example ansible setup repo 2015-04-03 12:01:36 -04:00
README.md Set up flannel in your cluster! 2015-06-24 13:45:42 -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 helps you to set up a Kubernetes cluster on machines where you can't or don't want to use the salt scripts and cluster up/down tools. They can be real hardware, VMs, things in a public cloud, etc.

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)

Configure the inventory file

Stick the system information gathered above into the 'inventory' file.

Configure your cluster

You will want to look though all of the options in group_vars/all.yml and set the variables to reflect your needs. The options should be described there in full detail.

Set up the actual kubernetes cluster

Now run the setup:

$ ./setup.sh

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

You can just set up certain parts instead of doing it all

Only etcd:

$ ./setup.sh --tags=etcd

Only the kubernetes master:

$ ./setup.sh --tags=masters

Only the kubernetes nodes:

$ ./setup.sh --tags=nodes

You may overwrite the inventory file by doing

INVENTORY=myinventory ./setup.sh

Only flannel:

$ ./setup.sh --tags=flannel

Analytics