Google Associate Cloud Engineer exam dumps

Google Associate Cloud Engineer practice question 209 of 375

Associate Cloud Engineer. Free level, Google Cloud. Free question with the correct answer and a full explanation.

Google Associate Cloud Engineer Question 209

Select 2Google Cloud Platform

You are managing a Google Kubernetes Engine (GKE) cluster and want to deploy a new application using a Deployment resource. The application requires 3 replicas and needs to be exposed to the internet. Which of the following steps should you take to achieve this?

  1. A

    Create a Deployment YAML file specifying 3 replicas and apply it using kubectl apply.

  2. B

    Run kubectl create deployment with the --replicas=3 flag.

  3. C

    Create a Service of type LoadBalancer to expose the Deployment to the internet.

  4. D

    Create a Network Endpoint Group to expose the Deployment to the internet.

  5. E

    Use kubectl expose to create a Service of type ClusterIP.

Show answer and explanation

Correct answers: A, C

Explanation

To deploy an application on GKE with 3 replicas and expose it to the internet, you can create a Deployment with the specified replicas and a LoadBalancer Service to handle external traffic. The LoadBalancer Service automatically provisions an external IP, making the application accessible from the internet.

  • A. Correct.

    Creating a Deployment YAML file and applying it using kubectl apply is a common way to define and manage Kubernetes resources declaratively, including setting the number of replicas.

  • B. Incorrect.

    Using kubectl create deployment with the --replicas=3 flag is another way to create a Deployment, but this command alone doesn't expose the application to the internet.

  • C. Correct.

    Creating a Service of type LoadBalancer is the recommended way to expose an application running on GKE to the internet, as it provisions an external IP address.

  • D. Incorrect.

    A Network Endpoint Group is related to Google Cloud's load balancing but is not directly used to expose Kubernetes applications.

  • E. Incorrect.

    Using kubectl expose with type ClusterIP exposes the application within the cluster, not to the internet.

Timed practice exam

Take a Google Associate Cloud Engineer practice test under exam conditions

60 questions in 120 minutes, drawn from this bank, with a score report and a per-question review when you finish.

Start timed exam