extracted_questions-01 Flashcards

1
Q

Your company stores terabytes of image thumbnails in Google Cloud Storage bucket with versioning enabled. An engineer deleted a current (live) version of an image and a non-current (not live) version of another image. What is the outcome of this operation?

A

The deleted current version becomes a non-current version. The deleted non-current version is deleted permanently.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Your company has terabytes of audit logs and analytics data in multiple BigQuery datasets. Some of these data sets need to be retained long term for audit purposes. You want to ensure analysts do not delete this data. What should you do?

A

Grant roles/bigquery.user IAM role to the analysts’ group.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

You developed a new mobile game that uses Cloud Spanner for storing user state, player profile and leaderboard. Data is always accessed by using the primary key. Your performance testing team identified latency issues in the application, and you suspect it might be related to table primary key configuration. You created the table by executing this DDL: CREATE TABLE users { user_id INT64 NOT NULL, user_name STRING (255), email_address STRING (255) } PRIMARY KEY (user_id) What should you do to fix this read latency issue?

A

Update the primary key (user_id) to not have sequential values.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

There has been an increased phishing email activity recently, and you deployed a new application on a GKE cluster to help scan and detect viruses in uploaded files. Each time the Finance or HR department receive an email with an attachment, they use this application to scan the email attachment for viruses. The application pods open the email attachment in a sandboxed environment before initiating a virus scan. Some infected email attachments may run arbitrary phishing code with elevated privileges in the container. You want to ensure that the pods that run these scans do not impact pods of other applications running in the same GKE cluster. How can you achieve this isolation between pods?

A

Create a new (non-default) node pool with sandbox type set to gvisor and configure the deployment spec with a runtimeClassName of gvisor.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

An external partner working on a production issue has asked you to share a list of all GCP APIs enabled for your GCP production project – production_v1. How should you retrieve this information?

A

Execute gcloud projects list –filter=’name:production_v1’ to retrieve the ID of the project, and execute gcloud services list –project to retrieve a list of all services enabled for the project.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Your finance team owns two GCP projects – one project for payroll applications and another project for accounts. You need the VMs in the payroll project in one VPC to communicate with VMs in accounts project in a different VPC and vice versa. How should you do it?

A

Share the VPC from one of the projects and have the VMs in the other project use the shared VPC. Ensure both projects belong to the same GCP organization.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Your company procured a license for a third-party cloud-based document signing system for the procurement team. All members of the procurement team need to sign in with the same service account. Your security team prohibits sharing service account passwords. You have been asked to recommend a solution that lets the procurement team login as the service account in the document signing system but without the team knowing the service account password. What should you do?

A

Register the application as a password vaulted app and set the credentials to the service account credentials.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Your company uses a legacy application that still relies on the legacy LDAP protocol to authenticate. Your company plans to migrate this application to the cloud and is looking for a cost-effective solution while minimizing any developer effort. What should you do?

A

Use secure LDAP to authenticate the legacy application and ask users to sign in through Gmail.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

You developed a python application that exposes an HTTP(s) endpoint for retrieving 2-week weather forecast for a given location. You deployed the application in a single Google Cloud Compute Engine Virtual Machine, but the application is not as popular as you anticipated and has been receiving very few requests. To minimize costs, your colleague suggested containerizing the application and deploying on a suitable GCP compute service. Where should you deploy your containers?

A

Cloud Run.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

You developed a python application that gets triggered by messages from a Cloud Pub/Sub topic. Your manager is a big fan of both serverless and containers and has asked you to containerize the application and deploy on Google Cloud Run. How should you do it?

A

Assign roles/run.invoker role (Cloud Run Invoker role) on your Cloud Run application to a service account. Set up a Cloud Pub/Sub subscription on the topic and configure it to use the service account to push the message to your Cloud Run application.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Your data warehousing team executed an Apache Sqoop job to export data from Hive/Hbase and uploaded this data in AVRO file format to Cloud Storage. The business analysts at your company have years of experience using SQL. They have asked you to identify if there is a cost-effective way to query the information in AVRO files through SQL. What should you do?

A

Point a BigQuery external table at the Cloud Storage bucket and advise the business analysts to run their SQL queries in BigQuery.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Your company wants to move all its on-premises applications to Google Cloud. Most applications depend on Kubernetes orchestration, and you have chosen to deploy these applications in Google Kubernetes Engine (GKE) in your GCP project app_prod. The security team have requested you to store all container images in Google Container Registry (GCR) in a separate project gcr_proj, which has an automated vulnerability management scanning set up by a security partner. You are ready to push an image to GCR repo and want to tag it as tranquillity:v1. How should you do it?

A

Execute gcloud builds submit –tag gcr.io/gcr_proj/tranquillity:v1 from Cloud shell.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Your company has several business-critical applications running on its on-premises data centre, which is already at full capacity, and you need to expand to Google Cloud Platform to handle traffic bursts. You want virtual machine instances in both on-premises data centre and Google Cloud Compute Engine to communicate via their internal IP addresses. What should you do?

A

Create a new VPC in GCP with a non-overlapping IP range and configure Cloud VPN between the on-premises network and GCP.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

The machine learning team at your company infrequently needs to use a GKE cluster with specific GPUs for processing a non-restartable and long-running job. How should you set up the GKE cluster for this requirement?

A

Deploy the workload on a node pool with non-preemptible compute engine instances and GPUs attached to them. Enable cluster autoscaling and set min-nodes to 1.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

You want to deploy an application to GKE cluster to enable the translation of mp3 files. The application uses an opensource translation library that is IOPS intensive. The organization backup strategy involves taking disk snapshots of all nodes at midnight. You want to estimate the cost of running this application in GKE cluster for the next month. In addition to the node pool size, instance type, location and usage duration, what else should you fill in the GCP pricing calculator when estimating the cost of running this application?

A

Local SSD, Snapshot Storage and Persistent disk storage.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

Your organization has several applications in the on-premises data centre that depend on Active Directory for user identification and authorization. Your organization is planning a migration to Google Cloud Platform and requires complete control over the Cloud Identity accounts used by staff to access Google Services and APIs. Where possible, you want to re-use Active Directory as the source of truth for identification and authorization. What should you do?

A

Synchronize users in Google Cloud Identity with identities in Active Directory by running Google Cloud Directory Sync (GCDS).

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

Your colleague is learning about docker images, containers and Kubernetes, and has recently deployed a sample application to a GKE You deployed a demo application on a GKE cluster that uses preemptible nodes. The deployment has 2 replicas, and although the demo application is responding to requests, the output from Cloud Shell shows one of the pods is pending state. What is the most likely explanation for this behaviour?

A

Cluster autoscaling is not enabled, and the existing (only) node doesn’t have enough resources for provisioning the pod.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
18
Q

Your company stores terabytes of image thumbnails in Google Cloud Storage bucket with versioning enabled. You want to cut down the storage costs and you spoke to the image editing lab to understand their usage requirements. They inform you that they access noncurrent versions of images at most once a month and are happy for you to archive these objects after 30 days from the date of creation, however, there may be a need to retrieve and update some of these archived objects at the end of each month. What should you do?

A

Configure a lifecycle rule to transition non-current versions to Coldline Storage Class after 30 days.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
19
Q

What should you do to archive objects after 30 days and allow retrieval and updates?

A

Configure a lifecycle rule to transition non-current versions to Coldline Storage Class after 30 days.

20
Q

What instance size should you suggest for a mission-critical application requiring 64 virtual CPUs?

A

Use n1-standard-64 machine type when provisioning the compute engine instance.

21
Q

What should you do to control spiraling BigQuery job execution costs?

A

Create a separate GCP project for each department and configure billing settings on each project to pick up the costs for queries ran by their analytics team.

22
Q

How can you protect your instance from accidental termination in a shared development GCP project?

A

Set the deletionProtection property on the VM.

23
Q

How should you grant access to an operations engineer for a specific GCP project?

A

Assign the necessary roles to their G Suite email address.

24
Q

How should you design a system for caching images with a 30 GB in-memory cache?

A

Use Cloud Memorystore for Redis instance replicated across two zones and configured for 32 GB in-memory cache.

25
Q

How can you identify all datasets that contain the us_social_security_number column?

A

Write a custom script that queries BigQuery INFORMATION_SCHEMA.TABLE_SCHEMA where COLUMN_NAME=us_social_security_number.

26
Q

What is the recommended practice for deploying a production environment with no routes to the test environment?

A

In a new GCP project, enable the required GCP services and APIs, and deploy the necessary production resources.

27
Q

What should you do to provide IAM access for creating and managing service accounts?

A

Grant the user roles/iam.serviceAccountAdmin IAM role.

28
Q

How can you retrieve a list of compute engine instances for snapshotting?

A

Use gcloud to set up two gcloud configurations – one for each project. Write a script to activate the development gcloud configuration, retrieve the list of compute engine instances, then activate production gcloud configuration and retrieve the list of compute engine instances. Schedule the script using cron.

29
Q

How can you enable read access for an external auditor while maintaining Domain Restricted Sharing?

A

Create a new Cloud Identity account for the auditor and grant them roles/viewer IAM role on the production project.

30
Q

How can company users authenticate using Okta before accessing GCP resources?

A

Configure a SAML SSO integration with Okta as the Identity Provider (IdP) and Google as the Service Provider (SP).

31
Q

What should you do to allow public access to an LDAP server via TLS on UDP port 636?

A

Configure a firewall rule to allow inbound (ingress) UDP traffic on port 636 from 0.0.0.0/0 for the network tag allow-inbound-udp-636, and add this network tag to the LDAP server Compute Engine Instance.

32
Q

How should you retrieve information about IAM roles granted for Cloud Spanner?

A

Retrieve the information from Cloud Logging console by filtering admin activity logs for Cloud Spanner IAM roles.

33
Q

How can you set up an alert for Compute Engine service costs in the test project?

A

Ask your finance department to grant you the Project Billing Manager IAM role. Set up a budget and an alert for the test project in the billing account.

34
Q

What should you do to fix the issue of logs not reaching the BigQuery dataset?

A

Create an export for Compute Engine logs in Cloud Logging and set up BigQuery pt-logs dataset as sink destination.

35
Q

What should you do to provide your finance department access to view billing reports for all GCP projects?

A

Grant roles/billing.User IAM role to the finance group.

36
Q

How can you enable your analysts to SSH to a Shielded VM for running BigQuery jobs while adhering to security policies?

A

Enable os Login by adding a metadata tag to the instance with key: enable-oslogin and value: TRUE, and grant roles/compute.osLogin role to the analysts’ group.

37
Q

What is the most cost-efficient storage class for archiving audit logs that may need retrieval during quarterly audits?

A

Coldline Storage Class.

38
Q

What should you do if your production VMs struggle due to a lack of free IP addresses for autoscaling?

A

Expand the subnet IP range.

39
Q

How can you improve the performance of machine learning jobs running on GKE?

A

Create a new GPU enabled node pool with the required specification, and configure node selector on the pods with key: cloud.google.com/gke-accelerator and value: nvidia-tesla-k80.

40
Q

What should you do to allow an external audit team to view your complex GCP resource hierarchy without granting additional permissions?

A

Add all individual auditors to an IAM group and grant the group roles/browser IAM role.

41
Q

What is the recommended approach for archiving customer PII data indefinitely while minimizing storage costs?

A

Store new data in Regional Storage Class, and add a lifecycle rule to transition data older than 30 days to Coldline Storage Class.

42
Q

How can you authenticate your on-premises application to GCP services using a service account?

A

Run gcloud iam service-accounts keys create to generate a JSON key file for the service account and configure your on-premises application to present the JSON key file.

43
Q

What IAM access should you grant to your compliance team to prevent accidental disclosure of customer PII data?

A

Grant roles/accessapprovalapprover IAM role to the compliance team group.

44
Q

How can you automate the provisioning of a monitoring pod along with a GKE cluster using Deployment Manager?

A

Add a new type provider in Deployment Manager for Kubernetes APIs and use the new type provider to create the DaemonSet resource.

45
Q

What should you do to consolidate costs from all GCP projects onto a single invoice?

A

Link all projects from production GCP organization to the billing account used by development GCP organization.