A Lead Systems Engineer is configuring a new administrative workstation to manage deployments on an existing Google Kubernetes Engine (GKE) Standard cluster named `analytics-prod-cluster` in region `us-central1`. The engineer has completed authentication via `gcloud auth login` and installed `kubectl`. However, executing `kubectl get pods` results in an error indicating connection attempts to `localhost:8080`. Simultaneously, the team needs to create a new node pool dedicated to processing fault-tolerant, asynchronous batch calculations while keeping compute costs to a minimum. Which pair of actions correctly resolves the command-line authentication issue and fulfills the workload requirement?
- Execute `gcloud container clusters get-credentials analytics-prod-cluster --region us-central1` to populate the local kubeconfig, and provision a node pool configured with `--spot` instances.Answer
- BExecute `gcloud config set container/cluster analytics-prod-cluster` to set the cluster context, and provision a node pool configured with `--spot` instances.
- CExecute `gcloud container clusters get-credentials analytics-prod-cluster --region us-central1` to populate the local kubeconfig, and provision a node pool using standard E2 machine types while disabling autoscaling.
- DExecute `gcloud config set project analytics-prod-cluster` to set cluster scope, and convert the existing GKE Standard cluster into a GKE Autopilot cluster.
Answer
Execute `gcloud container clusters get-credentials analytics-prod-cluster --region us-central1` to populate the local kubeconfig, and provision a node pool configured with `--spot` instances.
The correct response addresses both operational requirements: running `gcloud container clusters get-credentials` updates the local kubeconfig file with API server access credentials, resolving the `localhost:8080` connection error. Additionally, configuring a GKE node pool using `--spot` instances delivers significant cost reduction for stateless, fault-tolerant batch processing workloads.
Step-by-Step Solution
Key Concept
GKE Cluster Credential Fetching & Spot Node Pool Provisioning
Estimated Time:2m 0s