A system administrator needs to configure a fresh workstation to manage workloads on an existing Google Kubernetes Engine (GKE) Standard cluster named `analytics-prod` located in the `us-central1` region. The administrator has already installed the Google Cloud SDK (`gcloud`) and `kubectl`, and has authenticated using `gcloud auth login`. The application requires applying a Kubernetes deployment manifest named `app-deploy.yaml` and using a dedicated node pool optimized for high-reliability background processing without unexpected node preemption. Which of the following steps are required to achieve this deployment successfully? (Select TWO.)
- Run `gcloud container clusters get-credentials analytics-prod --region us-central1` to retrieve cluster credentials and update the local `kubeconfig` context.Answer
- BExecute `gcloud config set container/cluster analytics-prod` to point `kubectl` commands to the target cluster.
- Execute `kubectl apply -f app-deploy.yaml` to deploy the application resources to the cluster once cluster credentials are configured.Answer
- DProvision a Spot VM node pool for the background processing workload to guarantee zero node terminations during execution.
Answer
To successfully deploy the workload, the administrator must fetch the cluster credentials using `gcloud container clusters get-credentials analytics-prod --region us-central1` and then deploy the manifest using `kubectl apply -f app-deploy.yaml`.
The correct steps involve first fetching the cluster credentials into the local kubeconfig file using `gcloud container clusters get-credentials analytics-prod --region us-central1`, and second using `kubectl apply -f app-deploy.yaml` to deploy the declared resources to the GKE cluster.
Step-by-Step Solution
Key Concept
Configuring kubectl authentication for GKE clusters via gcloud and executing workload deployments.