Skip to main content

Posts

Showing posts with the label Ansible

Building Kubernetes Clusters using Kubespray

Disclaimer I have published this post on my work blog https://reece.tech previously. Preface We are hosting our workloads in Docker containers within various Kubernetes clusters. To ensure consistency and repeatability across environments, we are using idempotent configuration management tools like Ansible. Kubespray is an Ansible playbook used to manage Kubernetes clusters including initial build and also lifecyle of the cluster (adding or removing nodes, version upgrades etc.). Requirements We are automatically provisioning new VMs in our VSphere environment using Ansible. Once the new node is up and running, Kubespray runs across to install required Kubernetes services. In this example we are using a root user ssh key for passwordless authentication. Ansible 2.5 Kubespray git repository Steps Getting Kubespray The following commands will download Kubespray, select the latest release version and install necessary Python modules. git clone https://github.com/kubernetes-sigs/kubespray...