Horizontal Pod Autoscaler hoạt động thế nào?

HPA tự tăng/giảm số replicas dựa trên metrics như CPU, memory hoặc custom/external metrics. Nó cần Deployment/scale target, metrics pipeline và requests phù hợp để tính utilization có nghĩa.

Ví dụ:

bash
kubectl autoscale deployment api --cpu-percent=70 --min=2 --max=10

HPA không tự giải quyết cold start, DB bottleneck hoặc queue backlog nếu metric sai.

Với queue-based workloads, custom metrics như queue length thường tốt hơn CPU.

Xem toàn bộ Docker & Kubernetes cùng filter theo level & chủ đề con.

Mở danh sách Docker & Kubernetes