Best practices and common pitfalls
In this section, we want to share some best practices and common pitfalls from our production experience.
Here are some of the best practices:
- Configure probes (liveness, readiness) and control resource requests and limits (HPA and VPA):
- Ensure that your Pods have properly configured liveness and readiness probes. The HPA relies on these probes to make accurate scaling decisions.
- Have explicit resource requests and limits set for your containers. This helps the HPA make informed scaling decisions based on accurate resources. For the VPA, it gives you more understanding of everything the VPA can do with your workloads.
- Define meaningful metrics and realistic scaling thresholds (HPA): Choose metrics that align with the performance characteristics of your application, such as CPU utilization or custom metrics. Define scaling thresholds based on your application’s behavior and expected...