You want to create a VM instance on Google Cloud Platform that will run a small web server with low traffic. Which machine type should you select to optimize cost without sacrificing necessary performance?
Think about the minimum resources needed for a low-traffic web server and cost efficiency.
The n1-standard-1 machine type provides enough CPU and memory for a small web server and is the most cost-effective option among the choices. Larger machine types provide more resources but are unnecessary and more expensive.
You want to create a VM instance using the latest Debian 11 image from Google Cloud. Which of the following gcloud CLI commands correctly specifies the boot disk image?
Use the image family to get the latest image version automatically.
The correct way to specify the latest Debian 11 image is to use --image-family=debian-11 and specify the project debian-cloud. Option A is invalid because --image expects a full image name, not a family. Option A uses Debian 10, which is outdated. Option A misses the image project, so it will fail.
You have created a VM instance that hosts a web application on port 8080. Which firewall rule configuration will allow external users to access the application securely?
Think about which direction and port need to be open for users to reach your web app.
To allow users to access the web app on port 8080, you must allow incoming (ingress) TCP traffic on port 8080 from any IP address (0.0.0.0/0). Option C only allows SSH access on port 22. Option C allows outgoing traffic, which does not help external users connect. Option C blocks access.
You add a startup script to your VM instance metadata to install software on boot. What will happen if the script contains a command that fails?
Consider how startup scripts run during boot and their impact on the VM state.
Startup scripts run during boot but do not block the VM from starting if a command fails. The VM will boot normally, but the failed command will not complete successfully. The VM does not stop or reboot automatically due to script failure.
You need to deploy a critical application on VM instances in Google Cloud that must remain available even if a zone fails. Which architecture best meets this requirement?
Think about how to avoid a single zone failure affecting your application.
Deploying VM instances across multiple zones within the same region and placing them behind a regional load balancer ensures that if one zone fails, traffic is routed to instances in other zones, maintaining availability. Option D risks downtime if the single zone fails. Option D has no redundancy. Option D adds complexity without guaranteed availability benefits.