An operations team needs to configure local administration and cost-optimized infrastructure for a newly created Google Kubernetes Engine (GKE) cluster named `analytics-prod-cluster` in zone `us-east1-b`. The cluster will run administrative workloads alongside fault-tolerant, stateless batch worker processes. Which TWO actions should the team perform to properly configure local cluster access and optimize node execution costs for the batch processes?
- Run `gcloud container clusters get-credentials analytics-prod-cluster --zone us-east1-b` to populate the local kubeconfig file with endpoint and authentication context.Answer
- Provision a dedicated node pool configured with Spot VMs to host the fault-tolerant, stateless batch workloads.Answer
- CExecute `gcloud config set container/cluster analytics-prod-cluster` on the workstation to authenticate kubectl commands against the API server.
- DProvision the primary node pool hosting stateful cluster databases using Spot VMs to lower baseline running costs.
Answer
To configure administrative access and optimize node costs, the team must run `gcloud container clusters get-credentials analytics-prod-cluster --zone us-east1-b` to set up kubeconfig context and provision a Spot VM node pool for fault-tolerant, stateless batch workloads.
To manage a GKE cluster with kubectl, the administrator must first fetch cluster authentication credentials and update the local kubeconfig context using `gcloud container clusters get-credentials`. For cost optimization, GKE allows deploying node pools composed of Spot VMs, which provide substantial cost reductions for stateless, batch, or fault-tolerant workloads that can tolerate unexpected instance termination.
Step-by-Step Solution
Key Concept
GKE Cluster Credential Management and Spot VM Node Pool Workload Placement
Alternative Method
For automated CI/CD pipelines, cluster credentials can be fetched non-interactively using Service Account keys or Workload Identity before executing kubectl commands.
Estimated Time:2m 0s