Install Rancher 2 w/ Terraform & Ansible - Part #8 - Provision, Install, & Configure a Load Balancer
We now interrupt our regularly scheduled provisioning to focus on the Load Balancer. As mentioned at the start of this tutorial, you will need (at least) two servers to complete this process. Or one server and an Amazon Network Load Balancer, which won't be covered in this tutorial series, but is a viable option none the less. Provisioning the Rancher 2 load balancer involves a very similar procedure to that which we have already covered. We will need: * The common role * A custom nginx role * A new playbook, group, and group_vars Yes, I am opting for group_vars instead of host_vars. Whilst we won't be covering this here, you could - and perhaps should - have multiple load balancers, mitigating the single point of failure. It's all well and good having a highly available kubernetes cluster, but if the $2.50 VPS in front of it all suddenly dies... well, you're done-diddly-done-for. One point of note is that we will be running a full VPS here, with NGINX installed on that VPS. An alternative approach is to run a VPS with Docker, and run NGINX inside a Docker container. This adds complexity (one extra layer that can go wrong, and needs managing / monitoring), and in my opinion we don't gain anything from doing that here.