Google Associate Cloud Engineer Question 91
Select 3Google Cloud PlatformYou need to launch a Google Compute Engine instance for a web application that requires a persistent static IP address and needs to run in a specific zone for latency purposes. Which steps should you take to ensure these requirements are met?
- A
Reserve a static external IP address before creating the instance.
- B
Use the Google Cloud Console to select the specific zone during instance creation.
- C
Configure a startup script to allocate a static IP address after the instance is launched.
- D
Select the default network to ensure the instance has a static IP.
- E
Create a firewall rule to allow HTTP and HTTPS traffic to the instance.
Show answer and explanation
Correct answers: A, B, E
Explanation
To meet the requirements for a persistent static IP and specific zone placement, you should reserve a static external IP before launching the instance and select the specific zone during creation. Additionally, for a web application, allowing HTTP and HTTPS traffic through a firewall rule is crucial to ensure accessibility.
- A. Correct.
Reserving a static external IP address ensures that a specific IP is assigned to the instance, meeting the requirement for a persistent static IP.
- B. Correct.
During instance creation, selecting the specific zone ensures that the instance runs in the desired location for latency purposes.
- C. Incorrect.
Allocating a static IP via a startup script is not a recommended practice as it does not guarantee the IP will be the same every time the instance is restarted.
- D. Incorrect.
The default network does not inherently provide a static IP address; you need to reserve one explicitly.
- E. Correct.
Creating a firewall rule to allow HTTP and HTTPS traffic is necessary for a web application to be accessible over the internet.