Scheduling Configuration
The scheduling policy allows instances to run on specified nodes and effectively prevents other applications from being scheduled to those nodes, ensuring high availability of the instances.
TOC
Scenario Overview
-
PostgreSQL is deployed in a dedicated business cluster, and customers want different PostgreSQL instances to run on different nodes for easier maintenance and faster fault localization.
-
PostgreSQL is deployed within an existing business cluster, and customers want to deploy PostgreSQL instances on specified nodes while preventing other applications from being scheduled to the same nodes.
Both scenarios can be implemented by configuring Node Labels and Pod Tolerations in the Scheduling Configuration section on the instance creation page.
This section demonstrates how to run PostgreSQL instances on different specified nodes. The designated nodes are as follows:
Prerequisites
-
The platform administrator must update node labels on the specified nodes so that middleware can be scheduled to the designated nodes based on the labels.
-
The platform administrator must set taints on the specified nodes to ensure middleware can be scheduled to the tainted nodes based on tolerations while preventing other applications from being scheduled to those nodes.
You can configure nodes and taints based on actual requirements.
The platform administrator has already set node taints and labels in the platform center with the following configurations:
Configuration Explanation
-
Taint: A key-value attribute on a node that prevents Pods from being scheduled on it unless the Pod has a corresponding toleration.
-
Toleration: A key-value attribute on a Pod that allows it to tolerate specific node taints, ensuring the Pod is scheduled only to nodes it can tolerate.
Taints and tolerations support the effect parameter, with the syntax format key=value:effect. The effect defines the exclusion level for the Pod and includes three types:
When defining tolerations on a Pod, two operators are supported:
Procedure
-
In the left navigation panel, click PostgreSQL.
-
Click Create PostgreSQL Instance.
-
Complete the parameter configuration. In the Scheduling Configuration section, select the node label and taint based on the specified nodes.
-
Click Create. The PostgreSQL instance Pod will be scheduled to nodes 192.168.100.103, 192.168.100.104, and 192.168.100.105.
Verification
You can verify that the PostgreSQL instances are running on the specified nodes by navigating to Container Platform > Compute Components > Container Groups.