tencent cloud

Tencent Kubernetes Engine

Release Notes and Announcements
Release Notes
Announcements
Release Notes
Product Introduction
Overview
Strengths
Architecture
Scenarios
Features
Concepts
Native Kubernetes Terms
Common High-Risk Operations
Regions and Availability Zones
Service Regions and Service Providers
Open Source Components
Purchase Guide
Purchase Instructions
Purchase a TKE General Cluster
Purchasing Native Nodes
Purchasing a Super Node
Getting Started
Beginner’s Guide
Quickly Creating a Standard Cluster
Examples
Container Application Deployment Check List
Cluster Configuration
General Cluster Overview
Cluster Management
Network Management
Storage Management
Node Management
GPU Resource Management
Remote Terminals
Application Configuration
Workload Management
Service and Configuration Management
Component and Application Management
Auto Scaling
Container Login Methods
Observability Configuration
Ops Observability
Cost Insights and Optimization
Scheduler Configuration
Scheduling Component Overview
Resource Utilization Optimization Scheduling
Business Priority Assurance Scheduling
QoS Awareness Scheduling
Security and Stability
TKE Security Group Settings
Identity Authentication and Authorization
Application Security
Multi-cluster Management
Planned Upgrade
Backup Center
Cloud Native Service Guide
Cloud Service for etcd
TMP
TKE Serverless Cluster Guide
TKE Registered Cluster Guide
Use Cases
Cluster
Serverless Cluster
Scheduling
Security
Service Deployment
Network
Release
Logs
Monitoring
OPS
Terraform
DevOps
Auto Scaling
Containerization
Microservice
Cost Management
Hybrid Cloud
AI
Troubleshooting
Disk Full
High Workload
Memory Fragmentation
Cluster DNS Troubleshooting
Cluster kube-proxy Troubleshooting
Cluster API Server Inaccessibility Troubleshooting
Service and Ingress Inaccessibility Troubleshooting
Common Service & Ingress Errors and Solutions
Engel Ingres appears in Connechtin Reverside
CLB Ingress Creation Error
Troubleshooting for Pod Network Inaccessibility
Pod Status Exception and Handling
Authorizing Tencent Cloud OPS Team for Troubleshooting
CLB Loopback
API Documentation
History
Introduction
API Category
Making API Requests
Elastic Cluster APIs
Resource Reserved Coupon APIs
Cluster APIs
Third-party Node APIs
Relevant APIs for Addon
Network APIs
Node APIs
Node Pool APIs
TKE Edge Cluster APIs
Cloud Native Monitoring APIs
Scaling group APIs
Super Node APIs
Other APIs
Data Types
Error Codes
TKE API 2022-05-01
FAQs
TKE General Cluster
TKE Serverless Cluster
About OPS
Hidden Danger Handling
About Services
Image Repositories
About Remote Terminals
Event FAQs
Resource Management
Service Agreement
TKE Service Level Agreement
TKE Serverless Service Level Agreement
Contact Us
Glossary

Node Resource Reservation Description

PDF
Modo Foco
Tamanho da Fonte
Última atualização: 2024-12-23 15:29:48
TKE clusters occupy node resources to run add-ons (such as kubelet, kube-proxy, and runtime). Therefore, the total number of node resources and the number of allocable resources in a cluster may differ from each other. This document describes the policies and notes in terms of node resource reservation in TKE clusters so that you can set reasonable numbers of requested resources and limited resources for Pods when deploying an application.

Policy for Calculating Allocable Node Resources

Calculation formula

Allocable = Capacity - Reserved - Eviction - Threshold

Node CPU reservation rules

Node CPU
Reservation Rule
Description
1c <= CPU <= 4c
0.1c is reserved.
-
4c < CPU <= 64c
0.1c is reserved for the 4c part, and 2.5% for the excessive part.
For example, if CPU = 32c, reserved resources = 0.1 + (32 - 4) * 2.5% = 0.8c.
64c < CPU <= 128c
0.1c is reserved for the 4c part, 2.5% for the 4c to 64c part, and 1.25% for the excessive part.
For example, if CPU = 96c, reserved resources = 0.1 + (64 - 4) * 2.5% + (96 - 64) * 1.25% = 2c.
CPU > 128c
0.1c is reserved for the 4c part, 2.5% for the 4c to 64c part, 1.25% for the 64c to 128c part, and 0.5% for the excessive part.
For example, if CPU = 196c, reserved resources = 0.1 + (64 - 4) * 2.5% + (128 - 64) * 1.25% + (196 - 128) * 0.5% = 2.74c.


Node memory reservation rules

Node Memory
Reservation Rule
Description
1 GB <= Memory <= 4 GB
25% is reserved.
For example, if memory = 2 GB, reserved resources = 2 * 25% = 512 MB.
4 GB < Memory <= 8 GB
25% is reserved for the 4 GB part, and 20% for the excessive part.
For example, if memory = 8 GB, reserved resources = 4 * 25% + (8 - 4) * 20% = 1,843 MB.
8 GB < Memory <= 16 GB
25% is reserved for the 4 GB part, 20% for the 4 GB to 8 GB part, and 10% for the excessive part.
For example, if memory = 12 GB, reserved resources = 4 * 25% + (8 - 4) * 20% + (12 - 8) * 10% = 2,252 MB.
16 GB < Memory <= 128 GB
25% is reserved for the 4 GB part, 20% for the 4 GB to 8 GB part, 10% for the 8 GB to 16 GB part, and 6% for the excessive part.
For example, if memory = 32 GB, reserved resources = 4 * 25% + (8 - 4) * 20% + (16 - 8) * 10% + (32 - 16) * 6% = 3,645 MB.
Memory > 128 GB
25% is reserved for the 4 GB part, 20% for the 4 GB to 8 GB part, 10% for the 8 GB to 16 GB part, 6% for the 16 GB to 128 GB part, and 2% for the excessive part.
For example, if memory = 320 GB, reserved resources = 4 * 25% + (8 - 4) * 20% + (16 - 8) * 10% + (128 - 16) * 6% + (320 - 128) * 2% = 13,475 MB.

Note:
You can use custom kubelet parameters to modify kube-reserved for node resource reservation. We recommend you reserve sufficient CPU and memory resources for add-ons to ensure node stability.

Viewing Allocable Node Resources

Run the following command (replace NODE_NAME with the actual node name) to check the allocable node resources in a cluster. The output result contains Capacity and Allocatable fields, along with measurements of CPU, memory, and temporary storage.
kubectl describe node NODE_NAME | grep Allocatable -B 7 -A 6

Notes

The reservation policy automatically takes effect for K8s v1.16 or later and nodes created after June 24, 2022, without no manual configuration required.
To ensure your business stability, the reservation policy won't take effect for existing nodes. This is because allocable resources may become fewer based on the calculation method, which means possible node eviction for nodes requiring a large number of resources.
If you want to apply the reservation policy to existing nodes, remove them from the cluster without termination and then add them in the TKE console. In this case, they become newly added nodes subject to the policy by default.

Ajuda e Suporte

Esta página foi útil?

comentários