Kubernetes

Scaling

In the context of Magnum and Kubernetes, there are two types of scaling:

  1. Scaling nodes

  2. Scaling containers

Scaling nodes

For redundancy and to increase the number of resources available to your cluster, you can scale up the number of nodes (instances). You can also scale them down.

  • When you scale up, Magnum creates a new Nova instance and adds it to the cluster

  • When you scale down, Magnum deletes a node in the cluster. Pods might be deleted without draining, so it is a good idea to build your services that can automatically recover from the loss of a node

To scale up and down, update the node_count label in Magnum. For example, to scale mycluster from 1 to 2 nodes, do:

openstack coe cluster update mycluster replace node_count=2

Scaling containers

Scaling up and down the number of containers is a Kubernetes operation. This can be done via kubectl. An example is changing the number of pods in a replicaset. We will cover this in the High Availability chapter.

More information

For more information, refer to: