Let's say you want to scale your cluster, whether as part of a script to add mode nodes based on demand, or to quickly bring the node count down. This can be done on a node pool basis. It's easy to do so from the command line in a single command. It takes the name of the cluster (or the ID), the pool ID, and --nodes which is the new number of nodes in the pool:

$ civo kubernetes node-pool scale kube_demo 5ef83b --nodes 5
Kubernetes cluster kube_demo will now have 3 nodes

By looking into the cluster status, we can see this change immediately starts building a new node, as we increased the count:

$ civo kubernetes show kube_demo
                ID : 1718b50e-4e87-4488-9e28-43c9e71f3432
              Name : kube_demo
           # Nodes : 3
              Size : g3.k3s.medium
            Status : INSTANCE-CREATE
           Version : 0.8.1
      API Endpoint :

| Name             | IP            | Status        |
| kube-master-7868 | | ACTIVE        |
| kube-node-7a70   | | ACTIVE        |
| kube-node-bc2c   |               | BUILD_PENDING |

Installed marketplace applications:
| Name           | Version   | Installed | Category     |
| Longhorn       | 0.5.0     | Yes       | storage      |
| Traefik        | (default) | Yes       | architecture |
| PostgreSQL 5GB | 11.5      | Yes       | database     |

Within seconds, your new node will also be active.

If you want to scale your cluster down, that's easy too: simply specify the number of nodes you want to scale down to, and the CLI will take care of the hard work.

Using the GUI

You can also use the dashboard to scale your nodes up or down, according to your needs with just a few simple clicks.

Click on "Scale Up/Down" :

Your Alt Text

Select the total number of nodes that you want to have. Here you can also see an estimate of the cost applicable. Click on "Scale pool":

Your Alt Text

You are done! You can remove individual nodes from the dashboard, and delete the pool as well.

Your Alt Text

Recycling Nodes

If you need to rebuild nodes for whatever reason, such as a node you can use the recycle method. This takes as arguments your cluster and the specific node you wish to recycle. Recycling a node will delete it entirely, rebuild a new node to match it, and attach that to your cluster.

$ civo kubernetes recycle kube_demo --node kube-node-2f5d
The node (kube-node-2f5d) was recycled

If you were to take a look at your cluster, you would see something like the following, showing the new node being built (excerpted from civo kubernetes show kube_demo):

| Name             | IP | Status | Size      | Cpu Cores | Ram  | SSD disk |
| kube-master-7868 |    | ACTIVE | g2.medium |         2 | 4096 |       50 |
| kube-node-7a70 |    | ACTIVE | g2.medium |         2 | 4096 |       50 |
| kube-node-dd79   |    | BUILD  | g2.medium |         2 | 4096 |       50 |

Note: When a node is recycled, it is fully deleted. The recycle command does not drain a node, it simply deletes it before building a new node and attaching it to a cluster. It is intended for scenarios where the node itself develops an issue and must be replaced with a new one.

Remember, there is contextual help for all commands that you can access by running civo kubernetes help [COMMAND] at any time.