ForMe1 Flashcards
(101 cards)
You work in a small company where everyone should be able to view all resources of a specific project. You want to grant them access following Google’s recommended practices. What should you do?
Create a new Google Group and add all users to the group. Use “gcloud projects add-iam-policy-binding” with the Project Viewer role and Group email address.
Your project manager accidentally created an auto mode VPC. He is now asking you to convert the same to custom mode VPC as the applications are already deployed and they rely on static internal IP addresses. Is it possible?
Auto mode VPC can be converted to manual but the vice versa is not possible.
A health care company that provides medical service to the users want to track their network forensics, real-time security analysis and optimize the expense. The manager would like to track the network sent from and received by VM instances. What do you suggest they do?
VPC Flow Logs
Flow Logs are used to track network related findings.
You have been assigned to a new health application project where the backend instances are deployed using Managed Instance Groups. There are 4 instances running. The MIG is not set to automatically scale and you are asked to resize a group to handle an expected increase in traffic. Which of the following statements about MIG is incorrect?
When updating a MIG, no more than 500 instances can be specified in a single request.
When updating a MIG, up to 1000 instances can be specified in a single request.
?????????
What is the gcloud command to create a cluster named ch09-cluster-10 with four nodes?
gcloud container clusters create ch09-cluster-10 –num-nodes=4
A development team works with two Cloud Functions using node.js code. Each function corresponds to environments for development and production. The code is same except for the Cloud SQL database values used in each function. Team wants to maintain code in a clean and reusable fashion and decides to pass the database value during function execution. Which feature will allow you to do this?
Environment Variables
Environment variables for cloud functions enable you to dynamically pass settings to your function code and libraries, without making changes to your code
https://cloud.google.com/functions/docs/env-var
What is the correct command to create an IAM user using Google Cloud CLI?
The gcloud command to create an IAM user is gcloud projects add-iam-policy-binding whizlabs-prj –member “user:bob@xyz.com” –role “roles/editor”.
A developer has asked you to create a single nginx server for dev environment. Which service would allow you to launch VM using predefined images?
Marketplace
Marketplace provides you with pre-built images which can be launched with just a few clicks without doing any configuration.
Which of the following export options are available with Google Cloud Billing?
BigQuery and File
Billing export at the time of writing supports only BigQuery and File export
You are working for a service company that has an automobile client. The client has developed an application for internal use with Erlang and has approached your company to help him to ease the application deployment process on Google Cloud. The company does not have highly trained people so, wants you to deploy the application in such a way that post-deployment, they will be able to manage it without worrying about the infrastructure. Which of the following service would you prefer?
Using App Engine Flexible environment, you can deploy an application written in any language without managing instances, load balancers, etc. manually.
Using the principle of least privilege, your colleague Bob needs to be able to create new instances on Compute Engine in project ‘Project A’. How should you give him access without giving more permissions than is necessary?
Give Bob Compute Engine Instance Admin Role for Project A - The Compute Engine Instance Admin role only gives access to create/edit compute engine resources such as instances, disks, and snapshots.
You have an application server running on Compute Engine in the europe-west1-d zone. You need to ensure high availability and replicate the server to the europe-west2-c zone using the fewest steps possible. What should you
Create a snapshot from the disk.
Create a disk from the snapshot in the europe-west2-c zone.
Create a new VM with that disk.
This makes sure the VM gets replicated in the new zone.
Which command will let you enable Google Compute service using gcloud CLI?
gcloud services enable compute
Your company has purchased a threat detection service from a third party and have asked you to upload all network logs to the application. Which of the following service will meet your requirements?
Flow logs capture each and every packet flowing within your network. It will record details like source IP, destination IP, source port, destination port, timestamp, etc.
You have a Kubernetes cluster with 1 node-pool. The cluster receives a lot of traffic and needs to grow. You decide to add a node. What should you do?
Use “gcloud container clusters resize” with the desired number of nodes.
This resizes the cluster to the desired number of nodes
Your team has deployed a few windows web servers on a custom VPC network and the same is running properly. After a few hours of the app suddenly crashes, developers are trying to remote access web servers, but are failing to do so. While troubleshooting the issue you realize that the firewall rule is missing. Which command will help you solve the problem?
The correct command to allow developers to remote access windows is:
gcloud compute firewall-rules create “remote-access” –network “whizlab-network” –allow tcp:3389.
You are trying to fetch metadata of a VM using “curl metadata.google.internal/computeMetadata/v1/” command but are constantly receiving 403 Forbidden. What could be the possible reason?
While querying metadata of an instance you must provide header “Metadata-Flavor: Google”. This header indicates that the request was sent with the intention of retrieving metadata values, rather than unintentionally from an insecure source, and allows the metadata server to return the data you requested. If you do not provide this header, the metadata server denies your request.
In VPC, which firewall rules are created by default while creating an automatic default VPC?
Allow SSH, RDP, ICMP, and internal traffic
One of your team members had accidentally included service account private JSON key while pushing code to GitHub. What steps should you immediately perform?
Private keys are meant to be kept safe and if they are uploaded to repositories, you must immediately delete them from the source and repository as well.
You have been hired as a contractor by one of the travel technology company who is planning to containerize their existing applications in such a way that they can perform a lift and shift very easily in future if they plan to move away from Google Cloud. Which service will best suit this case?
Kubernetes Engine
Kubernetes is an open-source solution supported by major cloud platforms and will be very easy for company to move out at later stage if required because they can use the same config files with very minor changes.
Your client wants to develop a new cost effective web application that runs on serverless platform using Cloud Function, Cloud Storage, Pub/Sub and Cloud CDN. The expected data would be 20 GB. Which of the following database would be the most suitable schemaless option to support the serverless functionality?
Cloud Firestore
Cloud Firestore is a fast, fully managed, serverless, cloud-native NoSQL document database that simplifies storing, syncing, and querying data for your mobile, web, and IoT apps at global scale
You have recently joined a startup that is migrating its infrastructure from AWS to Google Cloud. A junior has been assigned the task of migrating one of their web servers with Amazon Linux OS from AWS to GCP in a public subnet of custom VPC. He is able to migrate the instance successfully, but not able to get SSH access of migrated instance. What are the possible steps to look for? (Multiple Answer)
1-Check if he has added SSH key to the instance while launching phase. 2-Make sure the firewall is attached to the instance with tcp port 22 open. SSH works on TCP port 22 and hence that has to be allowed at firewall level along with public SSH key configured on VM
You need to allow traffic from specific virtual machines in ‘subnet-a’ network access to machines in ‘subnet-b’ without giving the entirety of subnet-a access. How can you accomplish this?
Create a firewall rule to allow traffic from resources with specific network tags, then assign the machines in subnet-a the same tags.
Network tags allow more granular access based on individually tagged instances - Instances by target tags: The firewall rule is applicable only to VMs if they have a matching network tag.
