Soru

Zorluk: OrtaDeploying and Managing Compute Engine Virtual Machines

A cloud engineer needs to deploy a Compute Engine virtual machine named `app-frontend` using the Google Cloud CLI. The VM must be configured to run with a dedicated custom service account to access Google Cloud resources securely. Additionally, the instance requires initial configuration parameters provided via key-value key pairs at boot time. Which flags should the engineer include in the `gcloud compute instances create` command to satisfy these requirements? (Select TWO.)

  1. Use `--service-account` followed by the email address of the dedicated custom service account.Cevap
  2. Use `--metadata` followed by key-value pairs to pass custom instance startup parameters.Cevap
  3. C
    Use `--service-account-key` followed by the file path to a downloaded JSON service account key.
  4. D
    Use `--provisioning-model=SPOT` to guarantee continuous, uninterrupted uptime for the application.

Cevap

The correct options are specifying `--service-account` with the service account email and using `--metadata` to pass key-value parameters.
Attaching a custom service account via `--service-account` provides proper IAM identity without exposing static keys, while passing configuration data via `--metadata` allows boot-time settings to be read by the virtual machine.

Adım Adım Çözüm

1
Identify the CLI flag required to attach a custom identity to a Compute Engine instance.
The `--service-account` flag specifies the target service account email address without needing private key files.
This enforces identity attachment natively within Compute Engine IAM management.
2
Identify the CLI flag required to pass custom key-value pairs to instance metadata at creation.
The `--metadata` flag defines custom key-value pairs available via the instance metadata server.
Custom metadata values allow boot-time script or application configuration parameters to be consumed.

Anahtar Kavram

Attaching custom service accounts and key-value metadata to Compute Engine instances via gcloud CLI flags.
Bu soruyu puanla