GCP - Associate Cloud Engineer Flashcards
Your company has hosted a gaming app on GCP. One of your applications is running on an autoscaling Google Kubernetes Engine (GKE) cluster that exposes a TCP endpoint. The application is managed by deployment with several replicas. Another application service on Compute Engine located on a different VPC (called ppp-network) but in the same region needs to access the application on GKE. How can you enable this access with minimum effort?
A.1. In GKE, create a LoadBalancer Service type that uses the application’s Pods as backend
2. Set the externalTrafficPolicy of the service to Cluster
3. Configure the Compute Engine instance to use the address of the load balancer that has been created
B.1. In GKE, create a NodePort Service type that uses the application’s Pods as backend
2. One is each VPC, create a Compute Engine instance called proxy with 2 network interfaces
3. Use iptables to forward traffic from ppp-network to the GKE nodes
4. Configure the Compute Engine instance to use the address of the proxy in ppp-network as the endpoint
C.1. In GKE, create a LoadBalancer Service type that uses the application’s Pods as backend
2. Add an annotation: cloud.google.com/load-balancer-type: Internal
3. Peer the two VPCs together
4. Configure the Compute Engine instance to use the address of the load balancer that has been created
D.1. In GKE, create a LoadBalancer Service type that uses the application’s Pods as backend
2. Add a Cloud Armor Security Policy to the load balancer
3. Configure the Compute Engine instance to use the address of the load balancer that has been created
C.
1. In GKE, create a LoadBalancer Service type that uses the application’s Pods as backend
2. Add an annotation: cloud.google.com/load-balancer-type: Internal
3. Peer the two VPCs together
4. Configure the Compute Engine instance to use the address of the load balancer that has been created
Your team is creating a social-media chat app that directly consumes messages from a Cloud Pub/Sub topic. The app will be deployed on Cloud Run. What Google-recommended practices should you follow?
A.1. Create a Cloud Function that will be triggered by Cloud Pub/Sub trigger on that topic
2. Invoke Cloud Run from the Cloud Function for every message.
B.1. Grant the Pub/Sub Subscriber role to the service account used by Cloud Run
2. Create a Cloud Pub/Sub subscription for that topic
3. Make your application pull messages from that subscription.
C.1. Create a service account
2. Give the Cloud Run Invoker role to that service account for your Cloud Run application
3. Create a Cloud Pub/Sub subscription that uses that service account and uses your Cloud Run application as the push endpoint.
D.1. Deploy your application on Cloud Run on GKE with only internal connectivity
2. For that topic create a Cloud Pub/Sub subscription
3. Within the same GKE cluster as your application, deploy a container that takes the messages and sends them to your application.
C.
1. Create a service account
2. Give the Cloud Run Invoker role to that service account for your Cloud Run application
3. Create a Cloud Pub/Sub subscription that uses that service account and uses your Cloud Run application as the push endpoint.
Your multiplayer 3D game is hosted on your own data center. A new player performance analytics feature will make use of Google Cloud Platform (GCP) AutoML. You have created a service account with appropriate access to AutoML. Your on-premise analytics service needs to authenticate with GCP APIs for using AutoML. What should you do?
A. Make use of service account credentials in your on-premises application.
B. Create a key file for the service account with appropriate permissions using gcloud.
C. Work with a vendor to set up a direct interconnect between your data center and Google Cloud Platform to enable authentication for your on-premises applications.
D. In the IAM & admin console, grant a user account similar permissions to the service account permissions and use this user account for authentication from your data center.
B. Create a key file for the service account with appropriate permissions using gcloud.
You work at a cryptocurrency broking company. Data protection laws in your country prevent you from deleting any user data. You need to devise a solution to store and archive user data on GCP. The laws require you to support compliance objectives for data from one geographic location. The data is archived after 30 days and is expected to be accessed annually. What should you do?
A. 1. Use Multi-Regional Storage. 2. Add a bucket lifecycle rule to archive data after 30 days to Coldline Storage.
B.1. Use Multi-Regional Storage. 2. Add a bucket lifecycle rule to archive data after 30 days to Nearline Storage.
C.1. Use Regional Storage. 2. Add a bucket lifecycle rule to archive data after 30 days to Nearline Storage.
D.1. Use Regional Storage. 2. Add a bucket lifecycle rule to archive data after 30 days to Coldline Storage.
D.
1. Use Regional Storage.
2. Add a bucket lifecycle rule to archive data after 30 days to Coldline Storage.
You have developed an inventory-management microservice on Compute Engine in a single subnetwork in the us-central1-a region. Your VPC currently has only 1 subnetwork. Another team is planning to deploy a payment service in the same project in the europe-west2 region. The payment service needs access to the inventory-management service. You want to follow GCP’s best practices. What should you do?
A. 1. Create a subnetwork in the same VPC, in europe-west2
2. Create the new instance in the new subnetwork and use the first instance’s private address as the endpoint
B.1. Provision a new VPC and a subnetwork in europe-west2
2. Expose the application with an internal load balancer
3. Create the new instance in the new subnetwork and use the load balancer’s address as the endpoint.
C. 1. Create a subnetwork in the same VPC, in europe-west2
2. Use Cloud VPN to connect the two subnetworks
3. Create the new instance in the new subnetwork and use the first instance’s private address as the endpoint.
D.1. Create a VPC and a subnetwork in europe-west2
2. Peer the 2 VPCs
3. Create the new instance in the new subnetwork and use the first instance’s private address as the endpoint.
A. 1. Create a subnetwork in the same VPC, in europe-west2
2. Create the new instance in the new subnetwork and use the first instance’s private address as the endpoint
You work as the country’s engineering head for a multi-national app development company. Compliance rules in your country require you to retain audit logs for 3 years. Your team is worried that it will result in significant costs since you have hundreds of GCP projects. You have been asked to implement the most cost-effective approach for retaining the logs. What should you do?
Note: Stackdriver is now called ‘Google Cloud’s Operation Suite’.
A. Export the logs from Cloud Audit to BigQuery using an export sink.
B. Export the logs from Cloud Audit to a Coldline Storage bucket using an export sink.
C. Build a custom script that uses logging API to copy the logs from Stackdriver logs to BigQuery.
D. Export the logs to Cloud Pub/Sub and write a Cloud Dataflow pipeline to store logs to Cloud SQL.
B. Export the logs from Cloud Audit to a Coldline Storage bucket using an export sink.
Your company is conducting a Cloud Security and Compliance audit through a third-party auditor. To facilitate the audit for your team, you need to give the auditors the list of the enabled Google Cloud Platform APIs for your GCP project. You want to use the command line. How should you do it?
A. Run gcloud services list –project <project> to get all enabled services.
B. Run gcloud init to create a new configuration and set the current project to your GCP project, and then run gcloud services list --available.
C. Find the account value using gcloud info, and then run gcloud services list --account <Account>.
D. Run gcloud projects describe <project> to get the project value, and then run gcloud services list --available.</project></Account></project>
A. Run gcloud services list –project <project> to get all enabled services.</project>
Your company has developed an email application that is used for internal communications and is hosted on GCP. Your finance team has raised a concern that last month’s bill for your GCP project was significantly higher than expected. On investigating further, you find that a GKE container in the development namespace emitted a huge number of logs, which resulted in higher costs. You as an engineering manager want to disable the logs quickly to prevent further expenses. How can you do it using the least number of steps?
A.1. Go to the Logs ingestion window in Stackdriver Logging
2. Disable the log source for the GKE container resource
B.1. Go to the Logs ingestion window in Stackdriver Logging
2. Disable the log source for the GKE Cluster Operations resource
C.1. Go to the GKE console, and delete existing clusters
2. Re-create a new cluster
3. Clear the option to enable legacy Stackdriver Logging
D.1. Go to the GKE console, and delete existing clusters
2. Re-create a new cluster
3. Clear the option to enable legacy Stackdriver Monitoring
A.
1. Go to the Logs ingestion window in Stackdriver Logging
2. Disable the log source for the GKE container resource
Your E-commerce website deployed on App Engine is going through a UI update. Before you fully roll out the update to all users, you want to test it with 3% of the users. What should you do?
A.1. Migrate the application to Google Kubernetes Engine
2. Use GCP Console to split traffic.
B.1. Migrate the application to Compute Engine
2. Use GCP Console to split traffic.
C.1. Deploy a new version as a separate app in App Engine
2. Then configure App Engine using GCP Console to split traffic between the two apps.
D.1. Deploy a new version of your application in App Engine.
2. Then go to App Engine settings in GCP Console and split traffic between the current version and newly deployed versions accordingly.
D.
1. Deploy a new version of your application in App Engine.
2. Then go to App Engine settings in GCP Console and split traffic between the current version and newly deployed versions accordingly.
Your organization has recently started using GCP. You are the head GCP administrator in your company. You have granted the Project Creator role to the Engineering team at the organizational level. You need to make sure only the finance team can link a project to a billing account, but they should not have any other privileges. What should you do?
A. On the billing account assign the finance team only the Billing Account User role
B. On the billing account assign the engineering team only the Billing Account User role
C. Assign the finance team:
1. On billing account -> Billing Account User role
2. In the organization -> Project Billing Manager role
D. Assign the engineering team:
1. On billing account -> Billing Account User role
2. In the organization -> Project Billing Manager role
C. Assign the finance team:
1. On billing account -> Billing Account User role
2. In the organization -> Project Billing Manager role
Your new shipment tracking website is planned to be hosted on Google Kubernetes Engine. The application needs to be exposed to the public using HTTPs over a public IP address. What should you do?
A.
1. Create a NodePort service for your application
2. Expose this service through a load balancer by creating an ingress resource.
B.
1. Create a ClusterIP service.
2. Configure the public DNS name of your application using the IP of this Service.
C.
1. Create a NodePort service to expose the application on port 443 of each node of the Kubernetes cluster.
2. Configure the public DNS name of your application with the IP of every node of the cluster to achieve load-balancing.
D.
1. Create an HAProxy pod in the cluster to load-balance the traffic to all the pods of the application. Forward the public traffic to HAProxy with an iptable rule.
2. Configure the DNS name of your application using the public IP of the node HAProxy is running on.
A.
1. Create a NodePort service for your application
2. Expose this service through a load balancer by creating an ingress resource.
Your fantasy sports app is made up of multiple backend microservices hosted on Compute Engine on different GCP projects. You need to enable communication between two such groups of Compute Engine VMs hosted on different projects in separate VPCs. What should you do?
A.
1. Make sure both projects belong to the same GCP organization.
2. Create a new VPC and add all instances in that VPC.
B.
1. Make sure both projects belong to the same GCP organization.
2. Share the VPC from one project and request that the Compute Engine instances in the other project use this shared VPC.
C.
1. Make sure you are the Project Administrator of both projects.
2. Create two new VPCs and add all instances.
D.
1. Make sure you are the Project Administrator of both projects.
2. Create a new VPC and add all instances.
B.
1. Make sure both projects belong to the same GCP organization.
2. Share the VPC from one project and request that the Compute Engine instances in the other project use this shared VPC.
Your organization has appointed a third-party company to perform an audit on GCP resources. The auditor is provided with a GSuite ID by your organization. The auditor needs to read, but not modify, all project items to perform his duties. How should you configure the auditor’s permissions?
A.
1. Create a custom role with view-only project permissions.
2. Assign the auditor with the custom role.
B.
1. Create a custom role with view-only service permissions.
2. Assign the auditor with the custom role.
C. Assign the auditor with the built-in project viewer role.
D. Assign the auditor with the built-in service viewer role.
C. Assign the auditor with the built-in project viewer role.
Your company is collecting user activity data on your E-commerce website and the data of the last 5 years is dumped in a large 5 TB AVRO file on cloud Storage. Your data analysis team needs access to that data to predict the demands of FMCG products. They are proficient in SQL. What is the most cost-effective way to fulfill their request quickly?
A.
1. Load the data into Cloud Datastore
2. Run SQL queries against it.
B.
1. Create a BigQuery table and load data in BigQuery.
2. Run a SQL query on this table and drop this table after you complete your request.
C.
1. Create external tables in BigQuery that point to Cloud Storage buckets
2. Run a SQL query on these external tables to complete your request.
D.
1. Create a Hadoop cluster on GCP.
2. Compress the AVRO file to copy it to NDFS.
3. Load the file in a hive table and provide access to your analysts so that they can run SQL queries.
C.
1. Create external tables in BigQuery that point to Cloud Storage buckets
2. Run a SQL query on these external tables to complete your request.
You have noticed some suspicious activity in a GCP service account. You want to find out when this service account was created. What should you do?
A.
1. Go to the Activity log (Audit log) and filter to view the Configuration category.
2. Filter the Resource type to Service Account.
B.
1. Go to the Activity log (Audit log) and filter to view the Configuration category.
2. Filter the Resource type to Google Project.
C.
1. Go to the Activity log (Audit log) and filter to view the Data Access category.
2. Filter the Resource type to Service Account.
D.
1. Go to the Activity log (Audit log) and filter to view the Data Access category.
2. Filter the Resource type to Google Project.
A.
1. Go to the Activity log (Audit log) and filter to view the Configuration category.
2. Filter the Resource type to Service Account.
An external auditing agency auditing your cloud practices has requested you to provide them with the information about when users were added to Cloud Spanner Identity Access Management (IAM) roles on a certain GCP project. How can you fetch this information from the GCP console?
Note: Stackdriver is now called ‘Google Cloud’s Operation Suite’.
A. Open the Cloud Spanner console and review the configurations.
B. Review IAM policies for Cloud Spanner roles in the IAM and Admin console.
C. Review information for Cloud Spanner in the Stackdriver Monitoring console.
D. Review admin activity logs by filtering them for Cloud Spanner IAM roles in the Stackdriver Logging console.
D. Review admin activity logs by filtering them for Cloud Spanner IAM roles in the Stackdriver Logging console.
You are the Owner of a fast-growing financial services startup. You have recently hired a person to manage all service accounts for Google Cloud Projects. What is the minimum permission you should grant this person to allow him to perform his duties?
A. Provide the user with roles/iam.roleAdmin role.
B. Provide the user with roles/iam.securityAdmin role.
C. Provide the user with roles/iam.serviceAccountUser role.
D. Provide the user with roles/iam.serviceAccountAdmin role.
D. Provide the user with roles/iam.serviceAccountAdmin role.