Google Associate Cloud Engineer

Google Associate Cloud Engineer

Get started today

Ultimate access to all questions.


You need to provision a GKE cluster in your development project and deploy Kubernetes resources defined in two YAML files: deployments.yaml for creating a deployment and service.yaml for setting up a LoadBalancer service. Which command sequence should you use in Cloud Shell to achieve this?




Explanation:

The correct sequence involves creating a GKE cluster with gcloud container clusters create, fetching its credentials with gcloud container clusters get-credentials, and then applying the Kubernetes resource configurations using kubectl apply -f. The other options either use incorrect commands (kubectl create or gcloud gke apply) or attempt to create a cluster with kubectl, which is not supported. References: