ansible playbooks to build a kubernetes cluster
Compatible with:
- Fedora Atomic 29
- Raspbian 9
- Debian 9 (Stretch)
Hypervisor support for Debian (libvirt with KVM)
- create an inventory in
inventories/
based on the sample - for virtual machines create a
cloud-config.yml
file invars/
- IMPORTANT: Inventory names will be used as hostnames. For example inventory name
master1
and kube_domainkube.example.com
would result tomaster1.kube.example.com
ansible-playbook -i inventories/<env> vm-creation.yml
ansible-playbook -i inventories/<env> kubernetes.yml
If you want to use an existing vpn network set flanneld_host_interface
to your vpn interface and add the variable internal_ip
pointing to the vpn interface address.
Wireguard needs a special patch, which you can apply by setting flanneld_over_wireguard
to true
.
ansible-playbook -i inventories/<env> kube-client.yml
kubectl config use-context <kube-context>