You need to deploy a containerized web application to an existing Google Kubernetes Engine (GKE) cluster from a freshly provisioned administrator workstation. Arrange the following steps in the correct sequential order from first to last to establish cluster access and deploy the application.
- 1Set the target Google Cloud project context using `gcloud config set project PROJECT_ID`.
- 2Fetch the cluster authentication credentials to configure local `kubeconfig` using `gcloud container clusters get-credentials CLUSTER_NAME --zone ZONE`.
- 3Deploy the application workload using `kubectl apply -f deployment.yaml`.
- 4Verify that the application pods are running successfully using `kubectl get pods`.
Cevap
The correct deployment sequence begins with setting the target GCP project ID, fetching the GKE cluster credentials to populate kubeconfig, applying the Kubernetes manifest file, and finally checking the pod execution status.
To interact with a GKE cluster from a command line environment, the administrator must first configure the active GCP project context and fetch the cluster credentials into the local `kubeconfig` file using `gcloud container clusters get-credentials`. Once authentication context is established, `kubectl apply` creates the workload resources, followed by `kubectl get pods` to verify pod startup.
Adım Adım Çözüm
Anahtar Kavram
GKE Cluster Credential Setup and Workload Deployment Workflow