Modifying Cluster Configurations
Cluster configuration parameters define node behavior, resource allocation, communication rules, and scaling policies in a distributed system. They affect the cluster's performance, stability, scalability, and fault tolerance. You can customize the core components of a CCE cluster by adjusting these parameter settings. The following table lists cluster configuration parameters that you can adjust as needed.
| Category | Description |
|---|---|
| Control resource scheduling, manage requests, ensure security, and toggle feature statuses to maintain efficient cluster operation and proper resource allocation. Modifying kube-apiserver parameters will restart the cluster and terminate existing persistent connections. Exercise caution when performing this operation. | |
| Manage and optimize resource scheduling, request control, and GPU resource allocation in clusters. You can dynamically adjust scheduling policies based on cluster loads and resource requirements to ensure efficient cluster running and maximize resource utilization. | |
| Control the behavior and synchronization frequency of different controllers in a cluster to optimize cluster resource management and task scheduling. | |
| Network Interface Settings (Supported Only by CCE Turbo Clusters) | Control and optimize the management of network resources in clusters, especially in heavy-load and large-scale clusters, to ensure efficient network running and proper resource allocation. |
| Network Interface Settings (Supported Only by CCE Clusters Using VPC Networks) | Specify the IP address range that does not require SNAT. This avoids unnecessary SNAT and optimizes network performance. |
| Extension Controller Configurations (Supported Only by Clusters v1.21 or Later) | Restrict the resource usage in the namespace to ensure fair and reasonable resource allocation. |
| Control the IPVS scheduling policy of nodes in the default node pool in a cluster. |
Procedure for Configuring Cluster Parameters
You can use either of the following ways.
- Log in to the CCE console. In the navigation pane, choose Clusters.
- Locate the target cluster, click ... to view more operations on the cluster, and choose Manage. This function allows you to modify parameter settings of Kubernetes native components and proprietary components. Figure 1 Configuration management
- In the Manage Component dialog box on the right, change Kubernetes parameter values as needed. For more details, see Cluster Configuration Parameters.
Modifying Configurations for Existing Clusters
You can use APIs to modify CCE cluster configurations. For details, see API Reference. For details about how to call an API, see Making an API Request.
PUT /api/v3/projects/{project_id}/clusters/{cluster_id}/nodepools/master/configuration
| Parameter | Description |
|---|---|
| project_id | The project ID. For details, see How to Obtain Parameters in the API URI? |
| cluster_id | The cluster ID. For details, see How to Obtain Parameters in the API URI? |
The request body is as follows:
{
"kind" : "Configuration",
"apiVersion" : "v3",
"metadata" : {
"name" : "configuration"
},
"spec" : {
"packages" : [ {
"name" : "kube-apiserver",
"configurations" : [ {
"name" : "default-not-ready-toleration-seconds",
"value" : 300
}, {
"name" : "default-unreachable-toleration-seconds",
"value" : 300
} ]
} ]
}
} In this example, the configuration parameters of the cluster control plane component (kube-apiserver) are modified as follows:
- Toleration time for nodes in the unready state during container migration (default-not-ready-toleration-seconds): 300
- Toleration time for nodes in the unreachable state during container migration (default-unreachable-toleration-seconds): 300
Modifying Configurations During Cluster Creation
You can use APIs to modify CCE cluster configurations during cluster creation. For details, see API Reference. For details about how to call an API, see Making an API Request.
POST /api/v3/projects/{project_id}/clusters
| Parameter | Description |
|---|---|
| project_id | The project ID. For details, see How to Obtain Parameters in the API URI? |
Enter the configurationsOverride field to modify cluster configuration parameters. The following is an example request body:
...
"spec" : {
"configurationsOverride" : [ {
"name" : "kube-apiserver",
"configurations" : [ {
"name" : "default-not-ready-toleration-seconds",
"value" : 300
}, {
"name" : "default-unreachable-toleration-seconds",
"value" : 300
} ]
} ]
}
... In this example, the configuration parameters of the cluster control plane component (kube-apiserver) are modified as follows:
- Toleration time for nodes in the unready state during container migration (default-not-ready-toleration-seconds): 300
- Toleration time for nodes in the unreachable state during container migration (default-unreachable-toleration-seconds): 300
References
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot
