nerdexam
Google

PROFESSIONAL-CLOUD-DEVELOPER · Question #123

Your team develops stateless services that run on Google Kubernetes Engine (GKE). You need to deploy a new service that will only be accessed by other services running in the GKE cluster. The…

The correct answer is C. Use a Horizontal Pod Autoscaler to scale the containers, and expose them via a ClusterIP. Horizontal Pod Autoscaler (HPA) scales by adding or removing pod replicas, which is the fastest and most effective scaling strategy for stateless services since new pods can start immediately without requiring existing pods to restart. Vertical Pod Autoscaler (VPA) scales by…

Deploying applications

Question

Your team develops stateless services that run on Google Kubernetes Engine (GKE). You need to deploy a new service that will only be accessed by other services running in the GKE cluster. The service will need to scale as quickly as possible to respond to changing load. What should you do?

Options

  • AUse a Vertical Pod Autoscaler to scale the containers, and expose them via a ClusterIP Service.
  • BUse a Vertical Pod Autoscaler to scale the containers, and expose them via a NodePort Service.
  • CUse a Horizontal Pod Autoscaler to scale the containers, and expose them via a ClusterIP
  • DUse a Horizontal Pod Autoscaler to scale the containers, and expose them via a NodePort

How the community answered

(29 responses)
  • A
    14% (4)
  • B
    7% (2)
  • C
    76% (22)
  • D
    3% (1)

Explanation

Horizontal Pod Autoscaler (HPA) scales by adding or removing pod replicas, which is the fastest and most effective scaling strategy for stateless services since new pods can start immediately without requiring existing pods to restart. Vertical Pod Autoscaler (VPA) scales by adjusting CPU/memory requests, which requires pod restarts and is slower. ClusterIP is the correct Service type because the service must only be reachable from within the GKE cluster; it does not require an external or node-level IP. NodePort (Options B and D) exposes the service on each node's IP at a static port, making it accessible outside the cluster, which is unnecessary and less secure for an internal-only service.

Topics

#Kubernetes#Horizontal Pod Autoscaler#Service Networking#GKE

Community Discussion

No community discussion yet for this question.

Full PROFESSIONAL-CLOUD-DEVELOPER Practice