A cloud engineer needs to deploy a containerized web application to a Google Kubernetes Engine (GKE) cluster from a local management workstation. In what order should the engineer execute the following commands to authenticate, configure cluster access, deploy the workload, and verify the deployment status?
- 1Authenticate the local environment using `gcloud auth login`.
- 2Fetch cluster credentials and update kubeconfig using `gcloud container clusters get-credentials app-cluster --zone us-central1-a`.
- 3Deploy the application manifest using `kubectl apply -f deployment.yaml`.
- 4Monitor the workload deployment rollout using `kubectl rollout status deployment/web-app`.
Cevap
The correct sequence of steps is: 1) Authenticate using `gcloud auth login`, 2) Update kubeconfig context using `gcloud container clusters get-credentials`, 3) Create resources using `kubectl apply -f deployment.yaml`, and 4) Confirm pod readiness using `kubectl rollout status deployment/web-app`.
The correct operational lifecycle requires authenticating identity first (`gcloud auth login`), retrieving the target GKE cluster endpoint and credentials to populate kubeconfig (`gcloud container clusters get-credentials`), applying the Kubernetes manifest (`kubectl apply`), and finally validating that the pods have successfully rolled out (`kubectl rollout status`).
Adım Adım Çözüm
Anahtar Kavram
GKE Cluster Credential Retrieval and Workload Deployment Lifecycle
Tahmini Süre:1m 30s