Add node pools
A node pool is a group of worker nodes with the same instance type. With several pools, you operate workloads of different sizes in the same cluster.
Typical reasons for an additional pool:
- Memory-intensive workloads must run on larger nodes than stateless web services.
- A workload must get its own nodes.
- You want to change to a different instance type.
Prerequisites
- A fully provisioned cluster
- Access to ccloud
Add a node pool
-
Open the cluster in ccloud.
-
Add a new node pool.
-
Fill in the fields:
Field Rule Name Lowercase letters, digits and hyphens, at most 18 characters. Must be unique in the cluster. Instance type C1 to C8 from the catalog. Number of nodes 1 to 32. -
Confirm the creation.
centron then creates the nodes in the background. The detail view shows, for each pool, how many nodes are planned and how many are ready.
Plan at least 2 nodes per pool, so that your application stays available during upgrades.
Change the instance type
You set the instance type when you add a pool. For a different type, move to a new pool:
-
Add a new pool with the necessary instance type.
-
Wait until all nodes of the new pool are ready.
-
Empty the nodes of the old pool:
kubectl cordon <node-name>
kubectl drain <node-name> --ignore-daemonsets --delete-emptydir-data -
Delete the old pool.
Delete a node pool
Delete the pool in ccloud. All nodes of the pool are removed. The pods on them stop and, where possible, start again on other nodes.
A cluster always keeps at least one node pool. To remove the complete cluster, see Delete a cluster.
Place workloads on a specific pool
Each node has the label centron.de/nodepool with the name of its pool. To run an application only on a specific pool, use a nodeSelector:
apiVersion: apps/v1
kind: Deployment
metadata:
name: processing
spec:
replicas: 2
selector:
matchLabels:
app: processing
template:
metadata:
labels:
app: processing
spec:
nodeSelector:
centron.de/nodepool: memory-pool
containers:
- name: worker
image: registry.example.com/processing:1.0
To see the pool of each node:
kubectl get nodes -L centron.de/nodepool