Rancher is an open source platform for running containers and building a private container service.

Kubernetes is an open-source container-orchestration system for automating application deployment, scaling, and management.

In this blog we will see how to setup Kubernetes Cluster with Rancher in local.

Prerequisites:

Total servers - 3

Step 1 :

Install Rancher Server,

To install Rancher Server follow this below link till step 4,

During docker installation check which version is compatible with Rancher for Kubernetes.

https://www.devopsart.com/2020/02/step-by-step-to-install-rancher-in.html

Step 2 :

Create Kubernetes environment from Rancher Console,

Login to Rancher Console. Choose environment > Manage Environment > Add Environment.

In Environment Template choose Kubernetes and create it.



And make sure the environment state is active like below,



Step 3 :

Add Rancher agents/hosts to Rancher server,

Now choose Kubernetes environment form Rancher console,Click Infrastructure then hosts.

Generate the register token to execute it on Rancher agent servers to add the hosts,



Execute the command in Rancher agent servers,



Now you can see, Rancher agents are listed in console.




Wait for sometime until the Kubernetes required containers are up and running.



you can check the list of containers by going to infrastructure tab then containers.



Once the setup is completed you can see the below page,



Click the KubernetesUI to view the Kubernetes Dashboard.



To use kubernetes cli,  click kubernetes tab from the top and choose cli,



That's all, we have successfully setup Kubernetes cluster with Rancher.

Post a Comment

Previous Post Next Post