- Lab
- A Cloud Guru
Managing Kubernetes Clusters with Rancher
Rancher provides a centralized hub for managing Kubernetes clusters across cloud service providers, data centers, and Internet of Things (IoT) devices. This allows organizations to standardize their Kubernetes version, access control, deployment, and lifecycles to simplify operations work. In this lab, we will go through the process of setting up a Rancher instance on an EC2 instance. We will go through the process of configuring Rancher to create an EKS cluster for us in our lab environment. Finally, we will install K3s, a lightweight, single-node Kubernetes distribution, on another EC2 instance and go through the process of importing that cluster into Rancher for central management. This will help you become familiar with how to use Rancher to create new Kubernetes clusters, as well as importing existing clusters hands-on.
Path Info
Table of Contents
-
Challenge
Install and Configure Rancher
- Configure the
rancher/rancher
container to run on therancher-server
EC2 instance. This EC2 instance has Docker installed and running at the start of the lab. - In the Rancher console, go through the initial configuration.
Note: A real-world setup of Rancher should not be on only one node. Production instances of Rancher should be designed for high availability and fault tolerance.
- Configure the
-
Challenge
Create an Elastic Kubernetes Service (EKS) Cluster in Rancher
- Create an AWS access key and secret key in the IAM console for the
rancher_service_user
(the user will have some additional characters appended). - Add the AWS access key and secret to the Rancher console.
- Go to
Clusters
in the Rancher console and create an EKS cluster. - Compare the cluster in the Rancher console to the options and information available in the EKS console.
Note: Creating the EKS cluster can take 7-10 min. You may want to move on to the next objective and check back in on the EKS cluster's status.
- Create an AWS access key and secret key in the IAM console for the
-
Challenge
Create a K3s Cluster and Import It into Rancher
- Configure K3s to run on the
k3s-server
EC2 instance. - Set up the Rancher console to import the K3s cluster.
- Take the
kubectl
command generated by Rancher and run in the K3s cluster to complete the import.
- Configure K3s to run on the
What's a lab?
Hands-on Labs are real environments created by industry experts to help you learn. These environments help you gain knowledge and experience, practice without compromising your system, test without risk, destroy without fear, and let you learn from your mistakes. Hands-on Labs: practice your skills before delivering in the real world.
Provided environment for hands-on practice
We will provide the credentials and environment necessary for you to practice right within your browser.
Guided walkthrough
Follow along with the author’s guided walkthrough and build something new in your provided environment!
Did you know?
On average, you retain 75% more of your learning if you get time for practice.