Part 3: Scale
This is Part 3 of a multi-part, self-paced quick start exercise that will focus on scaling the number of worker nodes in a vSphere kubernetes cluster.
Step 1: Scale Nodes Up¶
In this step, you will scale up the number of worker nodes within the cluster. You can scale the number of nodes up or down, depending on your needs.
- Navigate to your project
- Select Infrastructure -> Clusters
- Click the gear icon on the cluster card
- Select "Scale Nodes"
- Update the number of worker nodes to 2
- Click "Scale"
The scale operation will begin.
- Click on the "Kubectl" button
- Type "get nodes"
The number of nodes has increased.
Step 2: Scale Nodes Down¶
In this step, you will scale down the number of worker nodes within the cluster. You can scale the number of nodes up or down, depending on your needs.
- Navigate to your project
- Select Infrastructure -> Clusters
- Click the gear icon on the cluster card
- Select "Scale Nodes"
- Update the number of worker nodes to 1
- Click "Scale"
The scale operation will begin.
- Click on the "Kubectl" button
- Type "get nodes"
The number of nodes has decreased.
Step 1: Scale Nodes Up¶
In this step, you will scale up the number of worker nodes within the cluster. You can scale the number of nodes up or down, depending on your needs.
You will scale the cluster by updating the "cluster.yaml" file and running "rctl apply" on the file.
Change the worker node machine count in the "cluster.yaml" file to "3" and save the file.
workerNodes:
machineCount: 3
- Open a terminal (on macOS/Linux) or Command Prompt (Windows)
- Navigate to the folder where you stored the "cluster.yaml" file
- Type the command below to scale up the vSphere cluster
rctl apply -f cluster.yaml
The scale operation will begin. Note, this operation can take several minutes to create new VMs and bring them online.
- Click on the "Kubectl" button
- Type "get nodes"
The number of worker nodes has increased to 3.
Step 2: Scale Nodes Down¶
In this step, you will scale down the number of worker nodes within the cluster. You can scale the number of nodes up or down, depending on your needs.
You will scale down the cluster by updating the "cluster.yaml" file and running "rctl apply" on the file.
Change the worker node machine count in the "cluster.yaml" file to "1" and save the file.
workerNodes:
machineCount: 1
- Open a terminal (on macOS/Linux) or Command Prompt (Windows)
- Navigate to the folder where you stored the "cluster.yaml" file
- Type the command below to scale up the vSphere cluster
rctl apply -f cluster.yaml
The scale operation will begin. Note, this operation can take several minutes to deprovision the VMs.
- Click on the "Kubectl" button
- Type "get nodes"
The number of worker nodes has decreased to 1.
Recap¶
Congratulations! At this point, you have successfully scaled the number of nodes in the vSphere cluster up and down.