You want your Google Kubernetes Engine cluster to automatically add or remove nodes based on CPU load. What should you do?
A.
Configure a HorizontalPodAutoscaler with a target CPU usage. Enable the Cluster Autoscaler from the GCP Console.
B.
Configure a HorizontalPodAutoscaler with a target CPU usage. Enable autoscaling on the managed instance group for the cluster using the gcloud command.
C.
Create a deployment and set the maxUnavailable and maxSurge properties. Enable the Cluster Autoscaler using the gcloud command.
D.
Create a deployment and set the maxUnavailable and maxSurge properties. Enable autoscaling on the cluster managed instance group from the GCP Console.
Answer: A
Support:
How does Horizontal Pod Autoscaler work with Cluster Autoscaler?
Horizontal Pod Autoscaler changes the deployment's or replicaset's number of replicas based on the current CPU load. If the load increases, HPA will create new replicas, for which there may or may not be enough space in the cluster. If there are not enough resources, CA will try to bring up some nodes, so that the HPA-created pods have a place to run. If the load decreases, HPA will stop some of the replicas. As a result, some nodes may become underutilized or completely empty, and then CA will terminate such unneeded nodes.
i'm for A, but the question in ambiguous, because requires the autoscale of nodes (not pod) when the cpu overload, but in answer use k8s pod autoscaler based on cpu load ( cpu load for pod, not nodes ). strange
Agreed, the question is not about pods, but answers are also talking about pods (not only)
A is correct because B is wrong according to
https://cloud.google.com/kubernetes-engine/docs/concepts/cluster-autoscaler
"Caution: Do not enable Compute Engine autoscaling for managed instance groups for your cluster nodes. GKE's cluster autoscaler is separate from Compute Engine autoscaling"
The answer is A.
More nodes mean it's horizontal scaling (increase VMs means vertical scaling of infrastructure). Cluster AutoScalar is used for increasing number of nodes.
A is the Correct answer, Horizontal Pod Autoscaler and Cluster Autoscaler can be used together to provision new pods and new nodes as per the CPU utilization.
https://www.youtube.com/watch?v=VNAWA6NkoBs
A...
The HPA and CA complement each other for truly efficient scaling. If the load increases, HPA will create new replicas. If there isn’t enough space for these replicas, CA will provision some nodes, so that the HPA-created pods have a place to run.
The Horizontal Pod Autoscaler changes the shape of your Kubernetes workload by automatically increasing or decreasing the number of Pods in response to the workload's CPU or memory consumption, or in response to custom metrics reported from within Kubernetes or external metrics from sources outside of your cluster.
A is wrong.
Pod scaling only spins up additional pods. Not nodes.
Cluster Autoscaler does adding of nodes automatically.
I am surprised that so many people think that A is the correct answer.
Correct answer per me is C
Horizontal Pod Autoscaler changes the deployment's or replicaset's number of replicas based on the current CPU load. If the load increases, HPA will create new replicas, for which there may or may not be enough space in the cluster. If there are not enough resources, CA will try to bring up some nodes, so that the HPA-created pods have a place to run. If the load decreases, HPA will stop some of the replicas. As a result, some nodes may become underutilized or completely empty, and then CA will terminate such unneeded nodes.
A voting comment increases the vote count for the chosen answer by one.
Upvoting a comment with a selected answer will also increase the vote count towards that answer by one.
So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.
Unfaithful
Highly Voted 2 years, 9 months agoheretolearnazure
8 months, 1 week agoAzureDP900
1 year, 6 months agoLaxmanTiwari
11 months, 3 weeks agoRajasa
2 years, 4 months agonatpilot
Highly Voted 4 years, 3 months agop4
3 years, 5 months agoskywalker
3 years, 11 months agoLaxmanTiwari
Most Recent 11 months, 3 weeks agoSur_Nikki
11 months, 3 weeks agoDeb2293
1 year, 2 months agoexamch
1 year, 4 months agomegumin
1 year, 5 months agoRajeev26
1 year, 6 months agoabirroy
1 year, 7 months agogee1979
1 year, 7 months ago6721sora
1 year, 8 months agoDrishaS4
1 year, 8 months ago[Removed]
2 years, 2 months agoOrangeTiger
2 years, 3 months agoehgm
2 years, 4 months agoharoldbenites
2 years, 4 months agoMaxNRG
2 years, 6 months agoMaxNRG
2 years, 6 months ago