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?
- AExecute 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.
- 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
- CExecute 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.
- DExecute 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
Key Concept
GKE cluster credential acquisition via gcloud and selecting GKE Autopilot Spot workloads for cost-optimized serverless Kubernetes operation.
Estimated Time:2m 0s