Table of Contents
In this Session, we will look into Top 250+ Google Cloud(GCP) Interview Questions and Answers that can be asked in 2021. Google Cloud is one of the most popular cloud Solution provider due to its many features and advantages over other cloud solution providers. It provides better pricing and performance as compared to other providers due to which more and more Organization are now switching to Google Cloud. This makes it as a very important topic for Cloud technology based Interviews. Here I have covered all the frequently asked questions to help the Interviewee answer GCP based questions in an effective manner.
Google Cloud(GCP) Interview Questions and Answers in 2021
1. In which of the VMs Persistent Disk Storage can be attached ?
Ans. Persistent Disk Storage can be attached to VMs in Google Compute Engine(GCE) and Google Kubernetes Engine(GKE).
2. When HDDs are preferred over SSDs storage ?
Ans. HDDs are usually preferred when storing large amounts of data and performing batch operations that are less sensitive to disk latency than interactive applications.
3. Which version of Redis is currently supported on Google Cloud ?
Ans. Redis 3.2
4. Which Service is used in Google Cloud(GCP) for In-Memory Cache ?
5. Which database service is used to scale databases resources vertically ?
Ans. Cloud SQL
6. Which database service is used to ensure consistency and transaction integrity for extremely large amount of data ?
Ans. Cloud Spanner
7. Which Service is used for Data Warehouse and Analytics Applications to handle large amount of columns and rows ?
8. What are different NoSQL databases used in GCP ?
Ans. Below are the three NoSQL databases used in GCP :-
a) Cloud Datastore
b) Cloud Firestore
c) Cloud Bigtable
9. What is the main advantage of Using Cloud Firestore NoSQL database ?
Ans. Its main advantage is for storing, synchronizing and querying data across distributed applications like mobile apps.
10. Is Bigtable a wide-column database or document database ?
Ans. It is a wide-column database. Check more about Bigtable on Official Documentation.
11. What are different data storage systems available in Cloud Firestore ?
Ans. There are two data storage systems available in Cloud Firestore:-
a) Using Firestore in Datastore mode.
b) Using Firestore in Native mode.
12. How to Create a bucket name test_bucket in GCP ?
Ans. gsutil mb gs://test_bucket/
13. What is the syntax to create a bucket using gsutil command in GCP ?
Ans. gsutil mb gs://test_bucket/
14. What is the permission required to create backups in GCP ?
15. What is the permission required to import data in GCP ?
16. What is the syntax to create a backup using gcloud command ?
Ans. gcloud -namespaces='[NAMESPACE]' gs://[BUCKET_NAME]
17. What is the syntax to import a backup file in GCP ?
Ans. gcloud datastore import gs://[BUCKET]/[PATH]/[FILE].overall_export_metadata
18. Which BigQuery command can be used to estimate how much data will be scanned ?
Ans. bq --location=[LOCATION] query --use_legacy_sql=false --dry_run [SQL_QUERY]
19. What is the command to create a topic in GCP ?
Ans. gcloud pubsub topics create [TOPIC-NAME]
20. What is the command to create a subscription in GCP ?
Ans. gcloud pubsub subscriptions create [SUBSCRIPTION-NAME] --topic [TOPIC-NAME]
21. How to configure cbt in Cloud SHELL ?
Ans. Use below command to configure cbt in cloud shell:-
gcloud components update
gcloud components install cbt
22. How to create a table "example-table" using cbt command ?
Ans. cbt createtable example-table
23. How to list all the tables using cbt command ?
Ans. cbt ls
24. How to create a family called "test-family" using cbt command ?
Ans. cbt createfamily example-table test-family
25. How to display the contents of table "example-table" ?
Ans. cbt read example-table
26. What is the command to create a cluster named "Test-Cluster" in "us-west2-a" zone ?
Ans. gcloud dataproc clusters create Test-Cluster --zone us-west2-a
27. How to Submit a Job "example.jar" on the Cluster "Test-Cluster" Using gcloud command ?
Ans. gcloud dataproc jobs submit spark --cluster Test-Cluster --jar example.jar
28. What is the command syntax to manually change the Bucket Storage Class ?
Ans. gsutil rewrite -s [STORAGE_CLASS] gs://[PATH_TO_OBJECT]
29. How to Copy hello.txt file from /root folder to Test-Bucket ?
Ans. gsutil cp /root/hello.txt gs://Test-Bucket/
30. What is the command to download hello.txt file from Test-Bucket bucket to /root directory ?
Ans. gsutil cp gs://hello.txt /root/
31. Which parameter is used to tell BigQuery to automatically detect the schema of a file on import ?
32. What is Pub/Sub in Google Cloud ?
Ans. It is an asynchronous messaging service that decouples services that produce events from services that process events.
33. What is the command to Install Kubectl command line tool in Google Cloud ?
Ans. gcloud components install kubectl
34. What is the command to authenticate through Docker Container Registry ?
Ans. gcloud auth configure-docker
35. How to set project in GCP using gcloud command ?
Ans. gcloud config set project <project_id>
36. How to set Compute zone to "us-east1" in GCP using gcloud command ?
Ans. gcloud config set compute/zone us-east1
37. How to create a Google Kubernetes Clusters "test-cluster" using gcloud command ?
Ans. gcloud container clusters create test-cluster --num-nodes=2
38. How to check all the instances running in GCP using gcloud command ?
Ans. gcloud compute instances list
39. Which Google Kubernetes Clusters location type provides high availability ?
40. Which of the operating systems support Google Cloud SDK ?
Ans. Below operating systems supports Google Cloud SDK:-