Kubernetes Homelab – Rancher Configuration

In the previous post, we covered the architecture of the lab, installing Rancher in an Ubuntu VM, and then setting up an Ubuntu template for consumption in Rancher.

In this post, I’ll show how setup a new node template to easily deploy nodes into a cluster.

vSphere Node Template

The first thing to do is to setup a node template inside Rancher so we can automatically consume the Ubuntu templates created in vSphere. To setup a new template, select the user icon in the upper right, and choose Node Templates from the drop down list. Then select Add Template.

Next, select the vSphere icon, and under 1. Account Access choose to add new credentials. Give the credentials a name, and enter in the address for vCenter (or ESXi) and the username & password for that server.

Next, in the 2. Scheduling section, input the information on where to deploy the cluster in the vSphere environment. Choose the Datacenter (if using vCenter) along with the Resource Pool, Golder, and Datastore that will hold the deployed Ubuntu VMs. Last, choose what host the VMs can be placed on. For my environment, I choose the default resource pool and a pre-setup VM Folder, along with my Synology 1817+ storage, and left the default of “any” host.

Now it’s time to select the Ubuntu template, and choose it’s sizing in 3. Instance Options. I chose to go with 4vCPU and 8gb RAM for each node, as well as 20gb disk space. Under Creation Method is the options for the source of our nodes:

  • Deploy from template: Data Center
  • Deploy from template: Content Library
  • Clone an existing virtual machine
  • Install from boot2docker ISO (Legacy)

Since I created an template, I selected the first option, Deploy from template: Data Center, and under the Template selected my ubuntu template named “ubuntu-cloudinit”.

Next pick the network the template will deploy the VMs onto, in my case “Lab-Network”.

Last, under Configuration Parameters used for guest info, add the key disk.enableUUID and set to TRUE so the vSphere CSI will work properly.

Finally, there are a couple more options that can be set, however, I left them all at default:

4. Tags – use vSphere tags for deployed VMs

5. Custom attributes (legacy)

6. vApp Options – organize the VMs into a vApp

Give the template a name – “cloudinit” in my case – and choose SAVE.

Time to deploy the cluster

Now that all the building blocks are put in place, it’s time to deploy the cluster….. which will be in the next blog post!

In the next post we will create a new cluster and watch as a Master and 3 worker nodes are setup, and automatically configured for our vSphere storage.

This Post Has 3 Comments

  1. Michael Greene

    Hi Tim, great post and I’m looking to do the same thing you have done here. I got the Ubuntu 18.04 LTS server installed with Docker. After I run the command to install Rancher, I am not able to access the web GUI via HTTPS. I can see the port is published by running “docker ps”, but I can’t access the website. Any thoughts? Also, which version of Rancher was used in your guide? I would like to make sure I’m using the version this guide was based on, as I suspect a newer version gets installed now versus when you published your guide in Dec.

    1. Tim

      Thanks. I believe I was using 2.5.1 or 2.5.2 for this.

      Interesting about the web access. Have you tried telneting to that ip&port to verify that something is responding?

      You could also try the option of installing rancher as a service (rancherd) instead of as a docker container.

  2. Michael Greene

    Tim, thanks for the quick response. I was able to get rancher version 2.5.2 installed, as it appears I need this version for esxi 7.x. I can see the container running fine and the ports published, but still can’t access the GUI via https.

    [email protected]:/home/psdcadmin# docker ps
    371e3b17a6ed rancher/rancher:v2.5.2 “entrypoint.sh” 41 minutes ago Up Less than a second>80/tcp,>443/tcp ecstatic_colden

    There is no fw enabled on my Ubuntu server, but I’m unable to access the web GUI or telnet on 443. If I use a rancher version prior to 2.5.2, I’m able to access the web GUI via 443, but this is without the “–privileded” command added to the deployment syntax. Any ideas?


Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.