A cloud administrator needs to configure a new management workstation to connect to an existing Google Kubernetes Engine (GKE) cluster named `app-cluster` in region `us-central1` and deploy a stateless web microservice onto a dedicated Spot node pool. Which TWO actions must the administrator perform? (Select TWO)
- Execute `gcloud container clusters get-credentials app-cluster --region us-central1` to generate cluster authentication credentials in the local kubeconfig file.Cevap
- Add a `nodeSelector` or node affinity configuration to the Deployment manifest targeting the Spot node pool labels.Cevap
- CExecute `gcloud config set container/cluster app-cluster` to register the cluster API endpoint directly into local environment variables.
- DDeploy the workload using a StatefulSet object with rigid persistent storage attachments to guarantee data persistence during Spot node preemptions.
Cevap
The administrator must fetch cluster credentials using the `gcloud container clusters get-credentials` command and configure a `nodeSelector` or node affinity in the Deployment manifest targeting the Spot node pool.
To manage a GKE cluster with kubectl, authentication credentials must be fetched into the local environment using `gcloud container clusters get-credentials`. For deploying stateless workloads to specific node pools such as Spot pools, specifying a `nodeSelector` or node affinity rules in the Deployment manifest ensures pods are scheduled onto the designated nodes.
Adım Adım Çözüm
Anahtar Kavram
GKE Cluster Credential Retrieval and Workload Scheduling on Spot Node Pools
Tahmini Süre:1m 30s