Soru

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

A cloud administrator is tasked with deploying an updated application deployment manifest (`deployment.yaml`) to an existing Google Kubernetes Engine (GKE) cluster from a new administrative workstation. Which TWO actions must the administrator perform to authenticate their environment and deploy the workload successfully? (Select TWO)

  1. Execute `gcloud container clusters get-credentials CLUSTER_NAME --zone ZONE` to retrieve cluster endpoint and authentication credentials into kubeconfig.Cevap
  2. Execute `kubectl apply -f deployment.yaml` to submit the workload configuration to the Kubernetes API server.Cevap
  3. C
    Execute `gcloud config set container/cluster CLUSTER_NAME` to authorize `kubectl` command execution against the cluster API server.
  4. D
    Execute `gcloud container node-pools update --enable-autopilot` to convert the cluster mode before running `kubectl` commands.

Cevap

The correct actions are to retrieve the cluster credentials using `gcloud container clusters get-credentials` and then apply the manifest using `kubectl apply -f deployment.yaml`.
To manage and deploy workloads to GKE, an administrator must first populate local kubeconfig credentials using `gcloud container clusters get-credentials`. Once authenticated, standard Kubernetes commands like `kubectl apply -f deployment.yaml` are used to apply workload configurations.

Adım Adım Çözüm

1
Authenticate kubectl with the GKE cluster
Local kubeconfig file is updated with cluster API server endpoint and security tokens.
kubectl requires active credentials and context settings to communicate with the GKE control plane.
2
Deploy the workload manifest
Kubernetes API processes deployment.yaml and updates cluster resources.
`kubectl apply` creates or modifies cluster resources declared in declarative YAML files.

Anahtar Kavram

GKE Cluster Credential Retrieval and Workload Deployment
Bu soruyu puanla