Kubernetes’ Horizontal Pod Autoscaler (HPA) can adjust the number of replicas in a deployment based on CPU usage. Here’s a sample configuration:

This setup scales the deployment’s pods when CPU usage exceeds 70%, with a minimum of 1 replica and a maximum of 10.