Question

Difficulty: HardDeploying and Managing Google Kubernetes Engine (GKE) Clusters and Workloads

A DevOps team is preparing to launch a fault-tolerant, stateless event-processing workload on Google Kubernetes Engine (GKE). To minimize cloud infrastructure spend and eliminate node management overhead, the architecture must leverage fully managed cluster infrastructure with compute capacity suited for interruptible batch workloads. However, when an engineer attempts to deploy the application manifest from a newly provisioned admin terminal using kubectl, the command fails with a context error indicating that the cluster endpoint cannot be resolved. Which combination of actions resolves the authentication context issue and aligns with Google-recommended deployment practices for this workload?

  1. A
    Execute gcloud config set container/cluster [CLUSTER_NAME] to configure the local CLI context, and deploy the workload to a GKE Standard cluster with a dedicated node pool configured with standard on-demand virtual machines.
  2. Execute gcloud container clusters get-credentials [CLUSTER_NAME] --region [REGION] to update the local kubeconfig configuration, and deploy the workload to a GKE Autopilot cluster specifying Spot pods in the workload manifest.Answer
  3. C
    Execute gcloud container clusters get-credentials [CLUSTER_NAME] --region [REGION] to update the local kubeconfig configuration, and deploy the workload to a GKE Standard cluster using persistent disk volumes on a single dedicated node pool without autoscaling.
  4. D
    Execute gcloud compute instances list to locate the cluster control plane IP, manually write the master IP address to the environment variable KUBECONFIG, and deploy the workload to GKE Standard with custom node OS kernel parameters.

Answer

Execute gcloud container clusters get-credentials to populate local kubeconfig credentials, and deploy the stateless, fault-tolerant workload to a GKE Autopilot cluster using Spot pods.
The option specifying gcloud container clusters get-credentials together with GKE Autopilot and Spot pods correctly satisfies all requirements. Fetching credentials via get-credentials updates the local kubeconfig file with valid endpoint details and authentication tokens required for kubectl commands. GKE Autopilot removes all node management overhead, and leveraging Spot pods provides maximum cost optimization for stateless, fault-tolerant batch workloads.

Step-by-Step Solution

1
Identify the proper gcloud command to authenticate kubectl with GKE control planes.
Running 'gcloud container clusters get-credentials [CLUSTER_NAME] --region [REGION]' populates/updates ~/.kube/config with cluster endpoints and auth tokens.
kubectl relies on local kubeconfig configuration entries generated by gcloud to communicate securely with the Kubernetes API server.
2
Evaluate cluster operational mode requirements.
Select GKE Autopilot mode to eliminate node provisioning, scaling, and OS maintenance overhead.
GKE Autopilot fully manages the underlying node infrastructure according to Google security and operational best practices.
3
Select compute instance pricing model for fault-tolerant batch workloads.
Configure Spot pods within GKE Autopilot.
Spot capacity offers up to 60-90% discount compared to standard pricing, ideal for stateless workloads that tolerate unexpected pod preemptions.

Key Concept

GKE cluster credential acquisition via gcloud and selecting GKE Autopilot Spot workloads for cost-optimized serverless Kubernetes operation.
Estimated Time:2m 0s
Rate this question