Soru

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

A cloud engineer needs to deploy a containerized application to a newly provisioned Google Kubernetes Engine (GKE) cluster from a local workstation. What is the correct sequence of steps to configure cluster access, deploy the workload, and verify pod execution?

  1. 1Fetch cluster authentication credentials and endpoint details using `gcloud container clusters get-credentials web-cluster --zone us-central1-a`.
  2. 2Submit the application deployment manifest to the cluster by running `kubectl apply -f deployment.yaml`.
  3. 3Inspect the status of the deployed workload pods using `kubectl get pods`.

Cevap

The correct sequence is: 1) Fetch cluster credentials using `gcloud container clusters get-credentials`, 2) Deploy the workload using `kubectl apply -f deployment.yaml`, and 3) Verify pod execution using `kubectl get pods`.
The workflow begins with configuring local cluster credentials via `gcloud container clusters get-credentials`, followed by creating cluster objects using `kubectl apply -f deployment.yaml`, and concludes by checking container state with `kubectl get pods`.

Adım Adım Çözüm

1
Retrieve cluster access configuration for the workstation.
Local `kubeconfig` is updated with credentials and API server endpoint info.
The `kubectl` CLI requires cluster context details provided by `gcloud container clusters get-credentials` before it can communicate with GKE.
2
Deploy the application resource manifest.
Kubernetes API server receives the manifest and creates Deployment and Pod resources.
Once `kubectl` is authenticated against the cluster, resources defined in `deployment.yaml` can be created using `kubectl apply`.
3
Confirm workload deployment status.
Pod lifecycle status and container health are displayed.
Executing `kubectl get pods` provides verification that container instances have been scheduled and are actively running.

Anahtar Kavram

Deploying workloads to Google Kubernetes Engine requires establishing CLI cluster context with gcloud container clusters get-credentials prior to applying resource manifests and inspecting pod status with kubectl.
Tahmini Süre:1m 0s
Bu soruyu puanla