K8S Performance Optimization - K8S APIServer tuning
This article was last updated on: July 24, 2024 am
preface
This is the second article in the K8S Performance Optimization Series: Kubernetes API Server Performance Optimization Parameter Best Practices.
Series:
List of parameters
The parameters recommended for optimization by kube-apiserver are as follows:
--default-watch-cache-size
: Default value 100; cache pool for List-Watch; 1000 or more recommended;--delete-collection-workers
: Default value 1; used to improve the speed of nameapce cleanup, which is beneficial for multi-tenant scenarios; Recommendation 10;--event-ttl
: Default value 1h0m0s; Used to control how long events are retained; When there are many cluster events, it is recommended to use 30M to avoid the rapid growth of etcd;--max-mutating-requests-inflight
: Default value 200; access frequency limit for write requests; 800 or higher recommended;--max-requests-inflight
: Default value 400; access frequency limit for read requests; 1600 or higher recommended;--watch-cache-sizes
: The system is set according to environmental heuristics; Used for core resources such as pods/nodes/endpoints, refer to the default-watch-cache-size setting for other resources; Starting from K8s v1.19, this parameter is set dynamically, and it is recommended to use this version.
EOF
K8S Performance Optimization - K8S APIServer tuning
https://e-whisper.com/posts/51187/