Compute
Elastic Cloud Server
Huawei Cloud Flexus
Bare Metal Server
Auto Scaling
Image Management Service
Dedicated Host
FunctionGraph
Cloud Phone Host
Huawei Cloud EulerOS
Networking
Virtual Private Cloud
Elastic IP
Elastic Load Balance
NAT Gateway
Direct Connect
Virtual Private Network
VPC Endpoint
Cloud Connect
Enterprise Router
Enterprise Switch
Global Accelerator
Management & Governance
Cloud Eye
Identity and Access Management
Cloud Trace Service
Resource Formation Service
Tag Management Service
Log Tank Service
Config
OneAccess
Resource Access Manager
Simple Message Notification
Application Performance Management
Application Operations Management
Organizations
Optimization Advisor
IAM Identity Center
Cloud Operations Center
Resource Governance Center
Migration
Server Migration Service
Object Storage Migration Service
Cloud Data Migration
Migration Center
Cloud Ecosystem
KooGallery
Partner Center
User Support
My Account
Billing Center
Cost Center
Resource Center
Enterprise Management
Service Tickets
HUAWEI CLOUD (International) FAQs
ICP Filing
Support Plans
My Credentials
Customer Operation Capabilities
Partner Support Plans
Professional Services
Analytics
MapReduce Service
Data Lake Insight
CloudTable Service
Cloud Search Service
Data Lake Visualization
Data Ingestion Service
GaussDB(DWS)
DataArts Studio
Data Lake Factory
DataArts Lake Formation
IoT
IoT Device Access
Others
Product Pricing Details
System Permissions
Console Quick Start
Common FAQs
Instructions for Associating with a HUAWEI CLOUD Partner
Message Center
Security & Compliance
Security Technologies and Applications
Web Application Firewall
Host Security Service
Cloud Firewall
SecMaster
Anti-DDoS Service
Data Encryption Workshop
Database Security Service
Cloud Bastion Host
Data Security Center
Cloud Certificate Manager
Edge Security
Managed Threat Detection
Blockchain
Blockchain Service
Web3 Node Engine Service
Media Services
Media Processing Center
Video On Demand
Live
SparkRTC
MetaStudio
Storage
Object Storage Service
Elastic Volume Service
Cloud Backup and Recovery
Storage Disaster Recovery Service
Scalable File Service Turbo
Scalable File Service
Volume Backup Service
Cloud Server Backup Service
Data Express Service
Dedicated Distributed Storage Service
Containers
Cloud Container Engine
SoftWare Repository for Container
Application Service Mesh
Ubiquitous Cloud Native Service
Cloud Container Instance
Databases
Relational Database Service
Document Database Service
Data Admin Service
Data Replication Service
GeminiDB
GaussDB
Distributed Database Middleware
Database and Application Migration UGO
TaurusDB
Middleware
Distributed Cache Service
API Gateway
Distributed Message Service for Kafka
Distributed Message Service for RabbitMQ
Distributed Message Service for RocketMQ
Cloud Service Engine
Multi-Site High Availability Service
EventGrid
Dedicated Cloud
Dedicated Computing Cluster
Business Applications
Workspace
ROMA Connect
Message & SMS
Domain Name Service
Edge Data Center Management
Meeting
AI
Face Recognition Service
Graph Engine Service
Content Moderation
Image Recognition
Optical Character Recognition
ModelArts
ImageSearch
Conversational Bot Service
Speech Interaction Service
Huawei HiLens
Video Intelligent Analysis Service
Developer Tools
SDK Developer Guide
API Request Signing Guide
Terraform
Koo Command Line Interface
Content Delivery & Edge Computing
Content Delivery Network
Intelligent EdgeFabric
CloudPond
Intelligent EdgeCloud
Solutions
SAP Cloud
High Performance Computing
Developer Services
ServiceStage
CodeArts
CodeArts PerfTest
CodeArts Req
CodeArts Pipeline
CodeArts Build
CodeArts Deploy
CodeArts Artifact
CodeArts TestPlan
CodeArts Check
CodeArts Repo
Cloud Application Engine
MacroVerse aPaaS
KooMessage
KooPhone
KooDrive

Configuring Scheduling and Differentiation

Updated on 2024-09-19 GMT+08:00

Scheduling Policies

Currently, there are two scheduling policies: cluster weights and automatic balancing.

Configuring a Scheduling Policy on the Console

  1. Log in to the UCS console.
  2. When creating a workload, click Next: Scheduling and Differentiation.
  3. Add a scheduling policy.

    Table 1 Scheduling policies

    Policy

    Description

    Cluster weights

    You need to select clusters and configure their weights. Pods are allocated to clusters based on the cluster weights.

    Auto balancing

    The system automatically selects clusters to allocate pods based on the number of remaining pods. No extra configuration is required.

Calculation Method Based on Cluster Weights

Calculation Method

After you set the weight of each cluster, the number of pods allocated to each cluster is calculated as follows:

  1. Formula for calculating the number of pods allocated to each cluster by cluster weight (The calculation result is rounded down.)

    Number of pods allocated to each cluster = (Total number of pods × Weight of a cluster)/Total weight of clusters

  2. Formula for calculating the number of remaining pods

    Number of remaining pods = Total number of pods - Total number of pods allocated to each cluster

  3. If there are any pods remaining, they will continue to be allocated by cluster weight in ascending order (one pod allocated at a time). If any clusters have the same weight, a cluster will be selected at random.

Example

There are seven pods that are assigned to three clusters named member1, member2, and member3. The clusters have weights of 2, 1, and 1, respectively.

  1. The number of pods allocated to each cluster is calculated as follows:

    Number of pods allocated to member1 = 7 × 2/4 (rounded down to 3)

    Number of pods allocated to member2 = 7 × 1/4 (rounded down to 1)

    Number of pods allocated to member3 = 7 × 1/4 (rounded down to 1)

    In this initial allocation, three pods are allocated to member1, one pod to member2, and one pod to member3.

  2. The number of remaining pods is calculated as follows:

    Number of remaining pods = 7 - 3 - 1 - 1 = 2

  3. The remaining pods are allocated by cluster weight in ascending order.

    One pod is first allocated to member1 and the remaining pod to member2 or member3 at random.

Tolerance Policies

A tolerance policy allows the scheduler to schedule pods to clusters with corresponding taints. This policy must be used together with cluster taints.

Using the Default Tolerance Policy

When you create a workload, UCS configures a default tolerance policy for your workload. The default tolerance policy adds taints listed in Table 2 to a faulty cluster. If the tolerance duration is exceeded, all pods in the cluster will be automatically evicted.

CAUTION:

After all pods in the faulty cluster are evicted, UCS does not migrate the pods back to the cluster based on the original scheduling policy after the cluster recovers. If you want to continue with the original scheduling policy configuration, you can reschedule the workload.

Table 2 Taints for faulty clusters

Taint Key

Tolerance Policy

cluster.karmada.io/not-ready

When the cluster is not ready, this taint is automatically added. If the tolerance duration is exceeded, all pods in the cluster will be automatically evicted.

cluster.karmada.io/unreachable

When the cluster is unavailable, this taint is automatically added. If the tolerance duration is exceeded, all pods in the cluster will be automatically evicted.

Configuring a Tolerance Policy on the Console

  1. Log in to the UCS console.
  2. When creating a workload, click Next: Scheduling and Differentiation.
  3. Add a tolerance policy.

    Parameter

    Description

    Taint Key

    Taint key of the cluster.

    Operator

    • Equal: matches the nodes with the specified taint key (mandatory) and value. If the taint value is left blank, all taints with the key the same as the specified taint key will be matched.
    • Exists: matches the nodes with the specified taint key. In this case, the taint value cannot be specified. If the taint key is left blank, all taints will be tolerated.

    Taint Value

    • If the value of Operator is Exists, the value attribute can be omitted.
    • If the value of Operator is Equal, the relationship between the key and value is Equal.
    • If Operator is not specified, the default value is Equal.

    Taint Policy

    • All: All taint policies are matched.
    • NoSchedule: Only the NoSchedule taint is matched.
    • NoExecute: Only the NoExecute taint is matched.

    Toleration Time Window

    tolerationSeconds, which is configurable only when Taint Policy is set to NoExecute.

    Within the tolerance time window, pods still run on the node with taints. After the time expires, the pods will be evicted. If the tolerance time window is not configured, the pods will never be evicted.

We use cookies to improve our site and your experience. By continuing to browse our site you accept our cookie policy. Find out more

Feedback

Feedback

Feedback

0/500

Selected Content

Submit selected content with the feedback