Kubespray (henceforth KS) is a composition of Ansible playbooks, inventory, provisioning tools, and domain knowledge for generic OS/Kubernetes clusters configuration management tasks. Kubespray provides:
- a highly available cluster;
- composable attributes;
- support for most popular Linux distributions (Ubuntu, CentOS, Fedora, ecc.).
Creating a cluster
Meet the requirements
Before using KS, some preliminary steps are required. Obviously the first thing is to create on OpenStack the VMs that will be part of the cluster and a VM, which we will call ServerAnsible (henceforth SA) and that it will have Ansible installed on it, from which to implement it. Communication via SSH from SA to other machines must be allowed. For example, you can create a key pair with the ssh-keygen command, depositing the private part on the SA and the public part on the cluster VMs. It is advisable to perform at least one access test between the SA and the other VMs, both for a connection test and to automatically register the VMs in the $HOME/.ssh/known_hosts file.
Now we are ready to clone the repository from GitHub to the SA
Now let's run the following commands