0% found this document useful (0 votes)
103 views

Google Container Engine Interview Questions and Answers

The document contains questions and answers about Google Kubernetes Engine. It includes commands for managing container clusters, images, services, and other Kubernetes resources through the gcloud command line tool. Key commands covered include gcloud container clusters create/delete to create and delete clusters, kubectl run to create pods, kubectl expose to create services, and gcloud docker commands to manage images.

Uploaded by

Sanjay Gupta
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
103 views

Google Container Engine Interview Questions and Answers

The document contains questions and answers about Google Kubernetes Engine. It includes commands for managing container clusters, images, services, and other Kubernetes resources through the gcloud command line tool. Key commands covered include gcloud container clusters create/delete to create and delete clusters, kubectl run to create pods, kubectl expose to create services, and gcloud docker commands to manage images.

Uploaded by

Sanjay Gupta
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 7

Google Container Engine Interview Questions And

Answers
1) What commands would you use to make your Google Container Registry
publicly accessible?

A) gsutil defacl ch -u AllUsers:R gs://<BUCKET_NAME>


gsutil acl ch -r -u AllUsers:R gs://<BUCKET_NAME>
gsutil acl ch -u AllUsers:R gs://<BUCKET_NAME>

2) What command would you use to set your default project?

A) gcloud config set project <PROJECT>

3) What flag would you use to create a pod or service using a YAML file?

A) -f

4) What command would you use to get the details of a container cluster?

A) gcloud container clusters describe <CLUSTER>

Google Container Engine Interview Questions 5) What is a Kubernetes


service?

A) A service defines a logical set of pods and a way to access them using an IP address
and port number pair.

6) What command would you use to login to the Google Container Registry?

A) docker login -e -u oauth2accesstoken -p “$(gcloud auth print-access-token)”


https://gcr.io

7) What command would you run to create a container cluster in more than
one zone?
A) gcloud container clusters create <CLUSTER> –zone <PRIMARY_ZONE> –
additional-zones=<SECONDARY_ZONE, SECONDARY_ZONE>

Google Container Engine Interview Questions 8) What command would you


use to delete a service?

A) kubectl delete services <SERVICE>

9) What command would you use to create a bucket?

A) gsutil mb gs://[BUCKET_NAME]/

Google Cloud Interview Questions

10) What command would you use to create a pod?

A) kubectl run <POD_NAME> –image=<IMAGE> –port=<PORT>

11) What command would you use to list your images in the Google
Container Registry?

A) gcloud beta container images list

12) What command would you use to push an image to the Google
Container Registry?

A) gcloud docker — push gcr.io/<PROJECT_ID>/<IMAGE>

13) What is the address for the Google Cloud Platform?

A) cloud.google.com

Google Container Engine Interview Questions 14) What does


the gsutilcommand do?

A) Lets you access Cloud Storage from the command line

15) What command would you use to create a container cluster?


A) gcloud container clusters <CLUSTER>

16) What command would you use to delete a container cluster?

A) gcloud container clusters delete <CLUSTER>

17) What command would you run to list the configuration for the Google
Cloud SDK?

A) gcloud config list

18) How would you tag an image in preparation for pushing it to the Google
Container Registry?

A) docker tag <IMAGE> gcr.io/<PROJECT_ID>/<IMAGE>

19) What command would you use to set the default zone for the Google
Cloud SDK?

A) gcloud config set compute/zone <ZONE>

Google Container Engine Interview Questions 20) What does the gclouddo?

A) Manages the Google Cloud Platform resources and developer workflow

Google Cloud Engine Interview Questions

21) What are core technology the container cluster nodes built on?

A) Kubernetes

22) What command would you use to create a persistent disk?

A) gcloud compute disks create –size <SIZE>GB <NAME>

Google Container Engine Interview Questions 23) What is a Kubernetes


pod?
A) A pod is a group of one or more containers, shared storage, and configuration data
relating to those containers.

24) What command would you use to list your container clusters?

A) gcloud container clusters list

Google Container Engine Interview Questions 25) What does GKE stand
for?

A) Google Container Engine

26) What address would you use to access the Kubernetes Dashboard?

A) <FQDN>:8001/ui
or
<IP>:8001/ui
Where you are running the dashboard from.

27) What command would you use to authenticate the Google Cloud SDK
with the Google Cloud Platform?

A) gcloud auth application-default login

28) What are command line tools installed by the Google Cloud SDK?

A) gcloud
gsutil
bq

29) On CentOS, what command would you run to install the Kubernetes
command line tool?

A) yum install kubectl -y

30) How would you execute a command on a container using Kubernetes?

A) kubectl exec -it <POD> -c <CONTAINER> <COMMAND>


Google Kubernetes Engine Interview Questions

31) What command would you use to enable autoscaling on an existing


container cluster?

A) gcloud alpha container clusters update <CLUSTER> –enable-autoscaling –min-


nodes=<MIN> –max-nodes=<MAX> –zone=<ZONE> –node-pool=<POOL>

32) How would you list all of the container clusters in a specific zone?

A) gcloud container clusters list –zone <ZONE>

33) What command would you use to get the node a pod is running on?

A) kubectl get pods -o wide

Google Container Engine Interview Questions 34) What flag would you use
with gcloud to specify a zone?

A) –zone <ZONE>

35) What command would you use to pull an image from the Google
Container Registry?

A) gcloud docker — pull gcr.io/<PROJECT_ID>/<IMAGE>

36) What command would you use to initialize the Google Cloud SDK?

A) gcloud init

37) What command would you use to describe an image in the Google
Container Registry?

A) gcloud beta container images describe gcr.io/<PROJECT_ID>/<IMAGE>

38) What command would you use to list all pods?

A) kubectl get pod or kubectl get po


39) What flag would you use to set the machine type when creating a
container cluster?

A) –machine-type <TYPE>

40) What command would you use to create a service using a load balancer
for a pod?

A) kubectl expose deployment <POD_NAME> –type=LoadBalancer

Kubernetes Engine Interview Questions

41) What command would you use to delete an image from the Google
Container Registry?

A) gcloud beta container images delete gcr.io/<PROJECT_ID>/<IMAGE>

42) What command would you use to get the details of a service?

A) kubectl describe services <SERVICE>

43) What command would you use to permanently delete a pod?

A) kubectl delete deployment <POD>

44) What command would you use to create a container cluster with
autoscaling?

A) gcloud alpha container clusters create <CLUSTER> –enable-autoscaling –min-


nodes=<MIN> –max-nodes=<MAX> –zone=<ZONE>

45) What command would use use to create an additional node pool for an
existing container cluster?

A) gcloud container node-pools create <NAME> –zone <ZONE> –cluster <CLUSTER>

46) What does the bq command do?


A) Lets you accesses BigQuery from the command line

47) What command would you use to ssh into a container cluster node?

A) gcloud compute ssh user@<NODE_NAME>

48) What commands would you use to make a publicly accessible Google
Container Registry private?

A) gsutil defacl ch -d AllUsers gs://<BUCKET_NAME>


gsutil acl ch -r -d AllUsers gs://<BUCKET_NAME>
gsutil acl ch -d AllUsers gs://<BUCKET_NAME>

49) What flag would you use to set the number of nodes when creating a
container cluster?

A) –num-nodes <NUMBER>

Google Container Engine Interview Questions 50) What command would


you use to list all services?

A) kubectl get services

51) What command would you use to start the Kubernetes Dashboard?

A) kubectl proxy –address=’0.0.0.0′ –disable-filter=true

Orginal Source: Linux Academy

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy