Kcna Kubernetes And Cloud Native Associate · Free Practice Question Medium

Question 35

Your company has a cloud-native application composed of several microservices, each with different scaling requirements. Some services experience high traffic and need to scale quickly, while others remain relatively stable. You are tasked with setting up Kubernetes objects that can automatically scale these services based on resource usage. Which Kubernetes resource should you use to automatically scale the microservices based on resource metrics such as CPU or memory usage?

  • A

    Horizontal Pod Autoscaler (HPA)

  • B

    ConfigMap

  • C

    DaemonSet

  • D

    Job

Reveal correct answer

Correct answer: A

A.

The Horizontal Pod Autoscaler (HPA) is the correct resource to use for scaling pods based on resource metrics like CPU and memory. It adjusts the number of pod replicas automatically based on observed metrics, making it ideal for microservices that experience variable traffic.

B.

ConfigMaps are used to store configuration data in key-value pairs, but they do not handle scaling or resource metrics.

C.

DaemonSets ensure that a specific pod is running on every node, which is useful for system services like logging or monitoring but is not used for scaling based on resource usage.

D.

Jobs are used to run one-off tasks that complete and exit; they do not handle continuous scaling based on metrics.

Discussion

Think the marked answer is wrong, or have a better explanation? Share it below — comments appear after review.

You must be logged in to post a comment.

Preparing For

Your Certification?

255+ certifications
Detailed explanations
Free PDF samples

Has All The Questions You Need