Rancher Kubernetes management platform

Building Plans

Adding Nodes

Currently, a usable Rancher cluster exists, but you would not be able to roll out workloads on it yet: What's missing are the nodes, or the systems that run the Kubernetes clusters for your user applications. In terms of preparation, the same applies to the nodes as to the Rancher servers, although you don't need a database. NTP must be enabled, though.

Once all the requirements are met, all it takes is the command:

# curl -sfL https://get.k3s.io | K3S_URL=https://<Rancher-Hostname>:6443 K3S_TOKEN=<Token> sh --

Replace <Rancher-Hostname> with the hostname assigned to the load balancer. The content you need to specify for K3S_TOKEN can be found in the /var/lib/rancher/k3s/server/node-token file on the servers.

Using Rancher

After following these steps, the first workloads can be rolled out in Rancher. The Marketplace belonging to Rancher can also be accessed from the web user interface. Preconfigured applications optimized for Rancher are available there, or they can be added to the installation from Helm charts.

This setup far from exhausts Rancher's feature set. Once the first applications are rolled out as services in Rancher, you can set up monitoring from the Monitoring menu item. It comes with alerting based on various parameters. If the combination of components from the context of cloud-native environments sounds familiar, you are on the right track, because Rancher does not implement its monitoring itself. Instead, it relies on Prometheus in the background (Figure 4), its alert manager, and the Grafana GUI component (Figure 5).

Figure 4: Prometheus is an exceptionally powerful tool for collecting metrics data. It implicitly works with Rancher under the hood to provide data from both Rancher and the end-user setups being run. © Alex Eillis
Figure 5: The team of Prometheus, its alert manager, and Grafana is also available in Rancher. Given an appropriate configuration by Rancher, the combo helps monitor container workloads. © Grafana

Conclusions

Rancher poses a number of requirements in terms of the infrastructure it expects onsite. Once rolled out, though, it turns out to be a decidedly powerful tool for running Kubernetes workloads. The setup proves to be an intuitive and comparatively smooth process. If you are looking to switch to Kubernetes, make sure you include Rancher in your evaluation.

Infos

  1. "Container microdistributions k3OS and Flatcar" by Martin Loschwitz, ADMIN , issue 60, 2020, pg. 24, https://www.admin-magazine.com/Archive/2020/60/Container-microdistributions-k3OS-and-Flatcar/
  2. "Managing network connections in container environments" by Martin Loschwitz, ADMIN , issue 63, 2021, pg. 58, https://www.admin-magazine.com/Archive/2021/63/Managing-network-connections-in-container-environments/
  3. Rancher docs: https://rancher.com/docs/

The Author

Freelance journalist Martin Gerhard Loschwitz focuses primarily on topics such as OpenStack, Kubernetes, and Ceph.

Buy this article as PDF

Express-Checkout as PDF
Price $2.95
(incl. VAT)

Buy ADMIN Magazine

SINGLE ISSUES
 
SUBSCRIPTIONS
 
TABLET & SMARTPHONE APPS
Get it on Google Play

US / Canada

Get it on Google Play

UK / Australia

Related content

comments powered by Disqus