A cloud engineer needs to configure a local command-line environment and deploy a containerized application to an existing Google Kubernetes Engine (GKE) cluster. In what sequential order should the engineer execute these tasks from start to finish?
- 1Set the active GCP project context using `gcloud config set project [PROJECT_ID]`.
- 2Fetch cluster endpoint and credentials into kubeconfig using `gcloud container clusters get-credentials [CLUSTER_NAME] --zone [ZONE]`.
- 3Verify cluster connection and context setup using `kubectl cluster-info`.
- 4Apply the workload configuration manifest using `kubectl apply -f deployment.yaml`.
Cevap
The correct sequence begins with setting the gcloud project context, fetching the GKE cluster credentials into kubeconfig, validating cluster access with kubectl cluster-info, and finally deploying the application manifest with kubectl apply.
The deployment process requires setting the project context first so gcloud references the correct project. Next, generating local credentials populates kubeconfig, establishing a valid context for kubectl. Validating connection via cluster-info verifies the setup. Finally, applying the manifest submits the workload definition to the GKE control plane.
Adım Adım Çözüm
Anahtar Kavram
Configuring local CLI tools (gcloud and kubectl) to access and manage GKE clusters
Tahmini Süre:1m 30s