Deploying Kubernetes on VMs with Kubespray

All the choices So you’re looking to start using Kubernetes, but you’re overwhelmed by the multitude of deployment options available? Judging by the length of the Picking the Right Solution section to the Kubernetes docs, it’s safe to assume that you’re not alone. Even after you’ve made it past the provisioning stage, you then need to learn how to administrate what is a very complex system. In short; Kubernetes is not easy....

August 9, 2017 · 9 min · Simon Weald

Ansible Node Bootstrapping

When you receive a new server, there are a variety of pre-requisites required before Ansible can be used to administrate the host. Below is my own personal playbook which works for both Debian and RedHat (and derivative) systems. --- # ansible-playbook bootstrap-ansible-target.yml -b -e 'user=user' - hosts: "{{ host }}" remote_user: "{{ user | default('root') }}" gather_facts: no pre_tasks: - name: attempt to update apt's cache raw: test -e /usr/bin/apt-get && apt-get update ignore_errors: yes - name: attempt to install Python on Debian-based systems raw: test -e /usr/bin/apt-get && apt-get -y install python-simplejson python ignore_errors: yes - name: attempt to install Python on CentOS-based systems raw: test -e /usr/bin/yum && yum -y install python-simplejson python ignore_errors: yes - setup: tasks: - name: Create admin user group group: name: admin system: yes state: present - name: Ensure sudo is installed package: name: sudo state: present - name: Create Ansible user user: name: ansible shell: /bin/bash comment: "Ansible management user" home: /home/ansible createhome: yes - name: Add Ansible user to admin group user: name: ansible groups: admin append: yes - name: Add authorized key authorized_key: user: ansible state: present key: "{{ lookup('file', '/etc/ansible/....

August 4, 2017 · 2 min · Simon Weald

Forcing Kubernetes to use a secondary interface

Following on from my previous post, I discovered rather to my dismay that although I had my nodes initially communicating over the secondary interface, the weave services (and thus my inter-pod traffic) was all going over the public interface. As these are VPSes, they have a public IP on eth0 and a VLAN IP on eth1, so it makes sense for all inter-pod traffic to stay internal. If I check the logs for one of the weave-net containers, we can see all comms are going via the 1....

November 20, 2016 · 6 min · Simon Weald

Deploying Kubernetes 1.4 on Ubuntu Xenial with Kubeadm

With the 1.4 release of Kubernetes, Google have made instantiating a cluster a whole lot easier. Using Kubeadm, you can bring up a cluster with a single command on each node. A further command will create a DaemonSet which brings up a Weave mesh network between all your nodes. As always with complex systems such as Kubernetes, there are some potential pitfalls to be aware of. Firstly, the getting started guide notes that v1....

November 17, 2016 · 6 min · Simon Weald