This repository contains anisble roles and a playbook that will provision a basic Kubernetes cluster to the provided master and nodes in the inventory.yaml file.
- CentOS7 has been installed on the master and nodes.
- Ensure the hostname of each machine is unique.
- Setup SSH Keys on the master and nodes. The inventory.yaml file has been configured to look for SSH keys at
./ssh-keys
. - Ensure each machine is able to reach the internet.
- Each machine needs to have a static IP.
The below steps are an example of how you can use this playbook to provision a Kubernetes cluster:
cd
to the root directory of this repository.- Edit inventory.yaml to contain the details of the hosts you are provisioning to.
- Execute
./provision.yaml
.
After provisioning, a file will be created at output/kubernetes/config. This is a kube config file that provides admin access to the cluster. Move this file to ~/.kube.
mv output/kubernetes/config ~/.kube/config