A cloud engineer needs to manually scale a running GKE Deployment named 'web-app' to 5 replicas and verify the deployment status using command-line tools. Arrange the operational steps in the correct chronological order from first to last.
- 1Fetch cluster credentials using 'gcloud container clusters get-credentials my-cluster --zone us-central1-a' to configure local kubectl context.
- 2Inspect the existing status and replica count of the workload using 'kubectl get deployment web-app'.
- 3Execute 'kubectl scale deployment web-app --replicas=5' to request additional Pod replicas.
- 4Verify that new Pods are scheduled and running by executing 'kubectl get pods -l app=web-app'.
Cevap
The correct operational sequence is: 1) Retrieve cluster credentials via gcloud, 2) Inspect current deployment status using kubectl get deployment, 3) Scale the deployment to 5 replicas using kubectl scale, and 4) Verify new pod creation using kubectl get pods.
To manage Kubernetes resources from a local terminal, an engineer must first authenticate and obtain cluster credentials using gcloud. Next, inspecting the current deployment state establishes a baseline. Executing the scale command updates the Deployment manifest in the GKE control plane. Finally, querying pod status verifies successful scheduling and pod startup.
Adım Adım Çözüm
Anahtar Kavram
Manual scaling and status verification of GKE Deployments using gcloud and kubectl CLI tools