Skip to content

Kubernetes Cluster using Rancher

Nirav Raje edited this page May 6, 2022 · 1 revision

Setting Kubernetes Cluster using Rancher

  1. Turn on 3 instances for the Kubernetes Cluster Setup, 1 Master and 2 Worker nodes.
  2. Setting up Master Node:-
  1. Login to rancher dashboard:- https://js-156-175.jetstream-cloud.org:31646/
  2. Click on Add Cluster, choose Existing Nodes
  3. Give a cluster name, and select Network Provider as Calico and click Next
  4. Set Node Options, select all checkboxes named etcd, Control Plane and Worker for Node Roles,
  5. Provide Node Public Address as IP of master Node, and name it with some custom node name.
  6. Copy the command provided after setting Node Options. And trigger it on master node
  7. Wait for several minutes and both Node & Cluster will be in Active state.
  1. Setting up Worker Nodes:-
  1. Select the options for newly created cluster and click Edit
  2. Go to bottom and again configure Node Options for each worker.
  3. Select Only Worker as Node Role, fill Public Address as Worker Instance IP and name them with some custom node name.
  4. Copy the command and trigger it on worker node.

After performing above steps, Cluster nodes in rancher look like this:-

image

  1. setting up kubectl on Master node:-
  • Go to the newly created cluster, click Kubeconfig File and copy it's content.
  • Open Master Node, create file:- ~/.kube/config and paste the content in it.
  • Install kubectl on Master node

run kubectl get all --all-namespaces

Clone this wiki locally