-
Notifications
You must be signed in to change notification settings - Fork 2
Step 2: Setting up Kubernetes cluster using Rancher
Himanshu Joshi edited this page May 6, 2022
·
7 revisions
Prerequisites: You need 3 VM's. (To be on safer side, anything above 8GB RAM should be sufficient).
Now that we installed Rancher in Step-1. We will setup the Kubernetes cluster from the Rancher UI.
- Login to your Rancher dashboard. Click on Add Cluster at the top of the page.
- Select existing nodes.
- Give any Cluster Name of your choice and use Networking as Calico. Rest keep everything as default.
- Click Next.
- For the Node Role, select etcd, control plane and worker and click on advanced options. (Very Important)
- Enter the public IP address on any one VM and give a node name. You can ignore the field Node Internal address.

- Now, copy the command and run this command on the VM whose IP address you mentioned.
- After a minute you should get a message. Node registered.
Wait for 5-10 mins. You should see the cluster to be in Active state.
Refer Known Issues below, if not in Active stage.
So, we have one master and one worker pointing to the same node.
- Now, on the home screen click on three dots of the cluster you setup. Click on Edit.

- Go to the bottom. And now select worker as Node role and update the IP address of a different VM. This VM will act as a worker node.

- Copy the command again and run this on the VM (whose IP address we mentioned above).
Repeat the above steps for the third VM. Your final dashboard should look something like this.

Now, before proceeding to the next steps. You need to create 3 partitions to all the VM's for setting up the Databases. Here is a nice write up from Team CloudElves. Please follow that to attach volumes before proceeding to the next step.
- If the first node has only etcd and control planes as roles. There are some DNS issues. This node was not able to resolve the domain name.
I was trying different combinations and observed that If I create the first node as all control,etcd and worker there is no such DNS isssue. I don’t know why this is working..:) The issue might be that when resolving the domain name to IP address it is only looking in the kubernetes DNS and not the global DNS. If you found a fix, please comment on this Issue-54.
- Error in Rancher UI -> "cattle-cluster-not-found"
FIX: Go to settings -> scroll down and search for "telemetry-opt" -> Edit it -> from the drop-down chose "in".
Milestone - 1:
Milestone - 2:
- Weather service and Forecasting service with 1 pod
- Weather Service and Forecasting Service with 3 and 5 pods
- User service - 1 pod
- User service -3 and 5 pods
- Auto Scaling
Milestone -3:
Milestone - 4: