Which Kubernetes feature automatically scales the number of pods in a deployment or replica set based on observed CPU utilization or other selected metrics?

Study for the Kubernetes Certified Network Administrator Exam. Our test offers comprehensive flashcards, multiple-choice questions, and detailed explanations. Be confident for your exam!

Multiple Choice

Which Kubernetes feature automatically scales the number of pods in a deployment or replica set based on observed CPU utilization or other selected metrics?

Explanation:
Horizontal Pod Autoscaler automatically scales the number of pods in a Deployment or ReplicaSet based on observed metrics such as CPU utilization. It continuously gathers usage data (via metrics-server or a custom metrics adapter), compares the average of the chosen metric to a target you set, and adjusts the replica count to keep that target. When demand climbs and CPU usage goes above the target, it increases the number of pods; when demand drops, it scales down. The minimum and maximum number of replicas are defined in the HPA configuration. It can use CPU by default, and with the right setup it can use other metrics as well. It does not change per-pod resource requests/limits (that’s Vertical Pod Autoscaler), nor does it resize the cluster by adding or removing nodes (that’s Cluster Autoscaler).

Horizontal Pod Autoscaler automatically scales the number of pods in a Deployment or ReplicaSet based on observed metrics such as CPU utilization. It continuously gathers usage data (via metrics-server or a custom metrics adapter), compares the average of the chosen metric to a target you set, and adjusts the replica count to keep that target. When demand climbs and CPU usage goes above the target, it increases the number of pods; when demand drops, it scales down. The minimum and maximum number of replicas are defined in the HPA configuration. It can use CPU by default, and with the right setup it can use other metrics as well. It does not change per-pod resource requests/limits (that’s Vertical Pod Autoscaler), nor does it resize the cluster by adding or removing nodes (that’s Cluster Autoscaler).

Subscribe

Get the latest from Passetra

You can unsubscribe at any time. Read our privacy policy