K8S Performance Optimization - K8S APIServer tuning

This article was last updated on: February 7, 2024 pm

preface

This is the second article in the K8S Performance Optimization Series: Kubernetes API Server Performance Optimization Parameter Best Practices.

Series:

  1. K8S Performance Optimization - OS sysctl Tuning

List of parameters

The parameters recommended for optimization by kube-apiserver are as follows:

  1. --default-watch-cache-size: Default value 100; cache pool for List-Watch; 1000 or more recommended;
  2. --delete-collection-workers: Default value 1; used to improve the speed of nameapce cleanup, which is beneficial for multi-tenant scenarios; Recommendation 10;
  3. --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;
  4. --max-mutating-requests-inflight: Default value 200; access frequency limit for write requests; 800 or higher recommended;
  5. --max-requests-inflight: Default value 400; access frequency limit for read requests; 1600 or higher recommended;
  6. --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/
Author
east4ming
Posted on
January 14, 2022
Licensed under