Skip to content

pstauffer/kubernetes-setup

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

kubernetes-setup

Build Status

Description

This Ansible project will install a kubernetes master and some minions, based on the getting started Guide. The installation has been tested on the Ubuntu 16.04 LTS - Xenial (HVM) and CentOS 7 (x86_64) - with Updates HVM image in the AWS Cloud. The packages are tagged with fix versions, which are working with this Ansible playbooks. The defined versions can be found in the kubebase defaults.

Roles

Playbooks

Requirements

  • Ansible 2.x
  • Ubuntu 16.04 or CentOS 7.x

Configuration

Default Project values

Create new inventory file

# switch in the inventories directory
cd inventories

# copy the sample file
cp sample cluster1

Edit the new inventory file

  • define the master and minion ip addresses
  • define your own kubemaster_token (Hint: Ansible Vault)
  • set the private_key_file path (optional)
  • set the remote user (optional)
  • set the python decision (optional)
[cluster:vars]

# kubernetes part
kubemaster_token = abcdef.abcdefabcdefabcd

# ansible part
ansible_ssh_private_key_file = sshkey.pem
ansible_user = ubuntu

# python part
install_python_centos = false
install_python_ubuntu = true

Usage

# example with cluster1 inventory file
ansible-playbook -i inventories/cluster1 playbooks/setup.yml

Disclaimer

  • works only on Ubuntu 16.04
  • all tasks run as root, become = True is set in ansible.cfg
  • some Ansible tasks are marked with changed_when: false. Sorry for that ;-)

## License MIT

## Author

  • Pascal Stauffer