Soru

Zorluk: OrtaDeploying and Managing Google Kubernetes Engine (GKE) Clusters and Workloads

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)

  1. Execute `gcloud container clusters get-credentials app-cluster --region us-central1` to generate cluster authentication credentials in the local kubeconfig file.Cevap
  2. Add a `nodeSelector` or node affinity configuration to the Deployment manifest targeting the Spot node pool labels.Cevap
  3. C
    Execute `gcloud config set container/cluster app-cluster` to register the cluster API endpoint directly into local environment variables.
  4. D
    Deploy 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

1
Authenticate kubectl with the GKE cluster
Local kubeconfig file updated with cluster API credentials and endpoint details.
kubectl requires active cluster context credentials to submit deployment requests.
2
Target the workload to the Spot node pool
Deployment spec includes matching nodeSelector key-value labels for the Spot node pool.
Kubernetes scheduler uses node selectors to assign stateless pod replicas to specific node pools.

Anahtar Kavram

GKE Cluster Credential Retrieval and Workload Scheduling on Spot Node Pools
Tahmini Süre:1m 30s
Bu soruyu puanla