A cloud engineer needs to deploy a containerized web application to an existing Google Kubernetes Engine (GKE) cluster and make it accessible to external users via a Google Cloud Load Balancer. Place the operational steps in the correct sequence from start to finish.
- 1Run `gcloud container clusters get-credentials` to configure local `kubectl` context with cluster authentication details.
- 2Define a Kubernetes Deployment manifest file (`deployment.yaml`) specifying the container image, container port, and replica count.
- 3Execute `kubectl apply -f deployment.yaml` to create the deployment resource and launch pods across cluster nodes.
- 4Execute `kubectl expose deployment` with `--type=LoadBalancer` to provision an external Cloud Load Balancer for the workload.
- 5Execute `kubectl get service` to retrieve the provisioned external IP address and confirm ingress connectivity.
Cevap
The correct operational sequence begins with fetching cluster credentials using `gcloud container clusters get-credentials`, followed by drafting the Deployment YAML manifest, deploying the manifest with `kubectl apply`, exposing the deployment via a `LoadBalancer` Service, and concluding with `kubectl get service` to obtain the external IP address.
The canonical workflow for deploying GKE workloads requires authenticating `kubectl` via `gcloud container clusters get-credentials`, defining the workload manifest file, applying the manifest via `kubectl apply`, exposing the deployment to external users via a `LoadBalancer` Service, and finally inspecting the allocated IP using `kubectl get service`.
Adım Adım Çözüm
Anahtar Kavram
GKE Workload Deployment and Service Exposure Workflow
Tahmini Süre:1m 30s