Wednesday 16 June 2021

GCP Interview Questions

 1)What are potential advantages in the GCP application design? 

Load balancers do not require pre-warning

GCP offers encryptin at-rest and in-flight for all services

No Queueing services required.


2)Which of the following GCP resources are regional?

Ans:GCP App engine applications


3)Which CLI tools are installed with the GCP SDK?

Ans:gcloud, gsutil, bq


4)Which statements regarding GCP automatic and custom subnetworks are correct?

automatic subnet creates one subnet in each region

Automatic subnets can converted back to automatic


5)Each GCP region includes at least how many zones?

Ans:3


6)What is the name of the Google Cloud Platform DNS service?

Ans:CloudDNS


7)To build a PCI compliant application in GCP, what level of isolation is recommended for your payment processing system?

Ans:GCP account


8)Which statements regarding the relationship between regions and availability zones are correct?

Ans:a region contain multiple instanes

9)A region contains multiple zones.

If a zone fails, other zones within the region are not affected.

Ans:Zones are independent sections of a region.


10)Google Cloud Platform deployment templates are made available via 

Ans:GCP MarketPlace


11)What statement(s) about GCP managed, multi-regional resources are correct? (Select all that apply)

They optimize efficiency and availability.

They are distributed in and across multiple regions.


12)Which of the following accurately describes Google Cloud Platform’s multi-region product availability?

Ans:GCP globally is divided into regions that map to continents. Each region has multiple zones that constitute individual data centers in specific countries.


13)____________________ is not available API types in Google Cloud Platform Console.

Ans:Kerberos


14)Which of the following is a zonal GCP resource?

Ans:GCP Compute Engine virtual machine instances


15)Which two instance data storage services are ideal for temporary data?

Ans:RAM Disks

Ans:Local SSDs


Each GCP region includes at least how many zones?

Ans:3


16)which of these can not be modified by user?

Ans:Project number


17)Which of the following statements about the Google Cloud Platform pricing tool is true?

The pricing tool has features that let you save estimates and email them to yourself for easy preservation.

GCP pricing tool can generate multiple estimates for the same product. This means that if you need an estimate for several Cloud SQL instances, for example, you can add them all to one aggregate estimate.

It is possible to interact with the GCP pricing tool over an API, meaning you can create scripts to generate pricing reports.


18)is similar to direct peering but it goes further by creating, literally, a dedicated physical connection.

yes dedicated internet connection

Ans:regional


19)In Google Cloud Compute Engine, which instance type isolates your VMs and workloads on their own physical servers?

Ans:sole-tenant


20)If you have configured Stackdriver Logging to export logs to BigQuery, but logs entries are not getting exported to BigQuery, what is the most likely cause?

Ans:The Cloud Data Transfer Service has not been enabled.


21)Dave has been asked to track down logging on some actions that were initiated by the GCP infrastructure. He's also been asked to review the audit logs for some actions that are associated with API calls.  Which audit log(s) should Dave be interested in?

Ans:Admin activity and system event logs.


22)Which two instance data storage services are ideal for temporary data? 

Local SSDs

RAM


23)In terms of accessibility on Google Cloud Platform, static external IP addresses represent

Ans:Regional 


24)Which of the following GCP resources is regional?

Ans:App Engine


25)Which of these is always assigned by GCP, and cannot be modified by the user?

Ans:project number 


26)Using _____ in Visual Studio Code allows you to simply open a project, click on “Run on Kubernetes,” and test your application running on a local Kubernetes cluster without even leaving Visual Studio Code.

Ans:Google Cloud Code 


27)If your existing application runs on virtual machines, then the easiest way to migrate it to Google Cloud is to use _____ Engine.

Ans:Compute


28)The unit of deployment in Google Cloud Deployment is called a _____.

Ans:deployment


29)Which of the following GCP resources are multi-regional? 

Ans:Cloud Storage data

Ans:GCP Virtual Private Cloud 


30)Which statements regarding GCP automatic and custom subnetworks are correct? (Choose 2 answers)

Ans:

Automatic subnets create one subnet in each region.

Automatic subnets can be converted to custom subnets, but not returned back to automatic.


31)GCP does not recommend editing the default permissions for ____________________, to avoid breaking service functionality for features such as auto scaling.

Ans:Google API service accounts



32)Which of the following statements about the Google Cloud Platform pricing tool is false?

Ans:Using the GCP pricing tool, I can generate a complete estimate for all of my needed serv


33)The CTO wants to build out a prototype cloud application in GCP using a serverless architecture model. Which GCP service will be of most interest to him?

Ans:App Engine


34)You have an application that is not intended for the web, or as a mobile app. It also is not built to host on containers. What GCP compute service would work best for this application?

Ans:Compute Engine


35)Which of the following statements is false?

Using Google Cloud Run to deploy your containerized applications gives you more control than deploying your own GKE cluster.

36)In Google Cloud Platform, what happens if the load on an instance group gets too high?

Ans:The autoscaler will add more instances.

37)Which of the following statements about Google Cloud Source Repositories is false?

For small applications with small development teams, you will likely use a combination of both branches and tags to keep code revisions organized.

38)The development team has submitted a ticket for a Cloud SQL instance for a web application that is crashing due to high CPU utilization. The network admin has suggested creating a Managed Instance Group to handle the load. Which suggested configuration below could solve the problem?

Ans:Create a Managed Instance Group with an autoscaling policy based on CPU utilization.


39)When you deploy a cluster in Google Cloud Platform that uses alias IP address ranges, it’s referred to as a(n) _

Ans:VPC Native cluster


40)An engineer alerts you that a production application on a web server VM seems to be receiving updates from a development VM.

Ans:The firewall log confirms that the production VM is receiving packets from the IP address of the development VM. You confirm that there is an ingress firewall rule that denies traffic with a target of the production VM, a source of the development VM, and a priority of 1000.


41)Which of the following explanations would explain the problem?

Ans:There is another ingress firewall rule that allows traffic with a target of the production VM, a source of the development VM, a priority of 1.


42)When designing VPC networks connected by a Cloud VPN, which statement below is a network design best practice Google recommends?

Ans:connected by custom networks 


43) In Google Cloud Platform, what does using a Shielded VM image offer over a regular image?

advanced security features---correct

the ability to share images

the ability to take snapshots

increased efficiency


44)Which of the following statements about Google Cloud Platform (GCP) firewall rules is false?

Every VPC network actually functions as a distributed firewall.

Connections to instances are allowed and denied on a per-network basis.--wrong answer

GCP firewall rules are used to allow or deny traffic to and from VM instances, based on your security needs.

Once configured and enabled, GCP firewall rules are always enforced, which means deployed instances are protected, regardless of their OS, configuration, or even startup status.

Connections to instances are allowed and denied on a per-network basis.


45)When adding storage to a compute instance in Google Cloud Platform, which of the following is not one of the available disk type choices?

zonal persistent

local SSDs

regional persistent

local flash---correct


46)In Google Cloud Platform, a(n) _____ allows you to operate an application across multiple identical VMs.

managed instance group--correct

access group

live migration

VM role


47)Fill in the blanks: To configure a Google Cloud instance's availability policy, you need to configure the instance's _____ behavior and _____ behavior.

maintenance, restart---correct

termination, migration

initialization, serialization

availability, downtime


48)Google Compute Engine provides _____ that you can add to VM instances to accelerate certain workloads such as data processing and machine learning.

GPUs--correct

load balancers

SSDs

functions

49)In Google Compute Engine, which type of workload is not a good choice for a managed instance group?

one in which you need to apply load balancing to groups of heterogeneous instances--correct

high-performance workloads

batch workloads

stateless workloads


50)Which of the following statements about reserving static internal IP addresses in Google Cloud Platform is false?

The reservation of a static internal IP address requires specific IAM permissions.--true 

By leveraging reserved static internal IP addresses, you can ensure that the resource that is assigned the reserved address always uses the same IP address, even if the resource is deleted and recreated.--true

You can reserve up to 200 static internal IP addresses per region, by default.--true

You can reserve static internal IP addresses for both VPC and legacy mode networks.--false

51)Which of the following statements about reserving static external IP addresses in Google Cloud Platform is true?

If you deploy an instance that requires a static external IP address that might change, you can reserve a static external IP for that instance.--false

A regional IP address can be used for global load balancers.--false

A reserved external IP address can be assigned to a new instance during creation of the instance.---correct 

A global IP address can be used by VM instances with one or more network interfaces.-false


52)To expand the primary IP range of an existing CIDR block subnet in Google Cloud Platform, you need to modify its _____.

subnet mask---correct

subnet identifier

router

host identifier


53) When a VM instance in Google Cloud Platform is stopped, what is lost?

MAC addresses

configured persistent disks

its application state---will be lost 

internal IPs


54)In Google Cloud Platform, the purpose of a(n) _____ is to facilitate the creation of identically configured instances.

shard

instance template--correct

image

snapshot


55) Which Google App Engine configuration file is used for overriding routing rules?

dispatch.yaml--correct

cron.yaml

queue.yaml

dos.yaml


56) In Google Kubernetes Engine, _____ are groups of nodes within a cluster that share the same configuration.

node controllers

containers

pods

node pools--correct


57)Which of the following is not one of the reasons we always want to use controllers when creating pods in Kubernetes?

Controllers reduce the monitoring workload.

Controllers help us ensure that pods are healthy.

Controllers give us more control.

Controllers allow us to work with the lowest level of abstraction possible.---correct


58)Which type of Kubernetes controller is designed for scenarios where we want to ensure that all or a specified set of nodes run a copy of the pod?

Deployment

ReplicaSet

StatefulSet

DaemonSet---correct


59)Which type of Kubernetes controller handles transitioning a set of pods from its current state to a defined desired state through declarative updates to a set of pods?

StatefulSet

ReplicaSet

Deployment--correct

DaemonSet


60)Which of the following statements about Standard and Flexible Google App Engine environments is true?


The Standard envionment is less resilient.

The Flexible environment has a bit more flexibility with its autoscaling options.

The Standard environment gives you direct control over your application runtime via Docker files.

The Flexible envionment is slower.---correct


61)In Kubernetes, servers are referred to as _____.

pods

nodes---correct

containers

controllers


62)Which of the following statements about service accounts in Google Cloud Identity and Access Management is true?

A service account can be treated as both an identity and a resource.--correct

A service account can be treated as an identity, but not as a resource.

A service account can be treated as a resource, but not as an identity.

A service account can be treated as neither an identity nor a resource


63)In Google Cloud Identity and Access Management, what is the topmost level of the resource hierarchy?

project

folder

resource

organization--correct


64)In Google Cloud Identity and Access Management, when you have a number of users and they all need similar permissions, it is useful to add _____ as members and assign roles to them.

organizations

Google Roles

Google Groups---correct

projects


65) In Google Cloud Identity and Access Management, a virtual identity attached to a cloud service is known as a _____.


service account--correct

virtual account

cloud account

cloud identity


66) The most common use case for folders in Google Cloud Identity and Access Management is providing a separate folder for each _____ in your organization.

department---correct

application

project

individual


67)In Google Operations (formerly Stackdriver), which type of audit logs record actions associated with API calls?

data access---correct

user access

system events

admin activity


68)_____ includes a centralized logging interface where you can see several different types of logs from different services in Google Cloud Platform in a single place.

Logdriver

storage buckets

Compute Engine

Google Operations (formerly Stackdriver)---correct


69)Through _____, you add data one record at a time to Google BigQuery, instead of adding a whole table at a time.

streaming--correct

queries

uploading

the command line


70)_____ were created to collect data from a wide variety of sources, and they were designed specifically for reporting and data analysis.


Cloud services

Query languages

Data warehouses---correct

Databases


71)Which is the most expensive Google BigQuery operation?

queries

storage

uploading data through the command line

streaming---correct


72)If you need to upload lots of files to Google BigQuery at the same time, the best choice is to use _____.

BigQuery's Large File Uploader tool

the command line---correct

the API

BigQuery's web interface


73)To find errors in your Google Cloud application, use Google _____.

Cloud Error Reporting--correct

Cloud Trace

Cloud Profiler

App Engine


74)Which of the following is not a step you can take to ensure the integrity of your Google Cloud Audit Logs?

Implement object versioning on the log buckets.---correct

Delete old log entries.

Apply the principle of least privilege.

Require two people to inspect the logs.


75)In Google Cloud Trace, what does each dot in the trace list represent?

an individual request to the application---correct

one minute

an error in the operation of your application

an individual user using the application


76) In Google Cloud Audit Logs, which type of audit log tracks Google's actions on Compute Engine resources?

Data Access

System Event---correct

Admin Activity

Compute


77)_____ is Google’s powerful monitoring, logging, and debugging tool.

Cloud Operations---correct

Cloud Audit Logs

BigQuery

Cloud Storage

Friday 11 June 2021

Kubernetes Interview Questions

 1. How to run Kubernetes locally?

ans: Kubernetes can be setup locally by using the minikube tool.


2. You have removed a Node from Service but it is kept in the cluster during the maintenance operation. How can you tell Kubernetes that it can resume scheduling new pods onto the node?

ans: kubectl uncordon <node-name>


3. Which command would print logs from your Pod's event with multiple containers?

Ans: kubectl logs <podname> --all-containers=true


4. What does a Kubernetes service do?

Ans: Defines a set of Pods and a policy to access them


5. What services does Ingress expose?

Ans: HTTP and HTTPS


6. What role does IP forwarding play with respect to Kubernetes?

Ans: It allows the kernel to route traffic from containers to the outside world.



7. When configuring a Highly-Available Kubernetes cluster, how many machines are needed for the masters?

Ans: 3 



8. You are creating your own StorageClass with your cluster. You create your .yaml file with parameters customized for this cluster. What is the next step in order to complete this setup?

Ans: Apply your .yaml file with the kubectl create -f command.


9. The following is a kubectl command dealing with network policies:

Ans: --image=nginx



10. You have a Kubernetes application with multiple clusters being used. You would like to implement a way to monitor the application while also being able to visualize it with a dashboard and a means to query your data. Which would satisfy your request?

Ans: Prometheus


11. What are the 4 C’s of the Cloud Native Security paradigm?

Ans: Code, Container, Cluster, Cloud


12. You are monitoring your application and then you step away from it for one hour. When you come back you see that something has gone wrong with one of your clusters. What can you do to find out what happened during this hour?

Ans: kubectl logs --since=1h <podname>


13. What is a binary file?

Ans:  A non-text file


14. You need to expose the single Service with an Ingress named test-ingress by specifying a default backend with no rules using the kubectl apply -f command. How can you view the state of the Ingress you just added?

Ans:  kubectl get ingress test-ingress


15. What language is the Kubernetes end-to-end testing framework written in?

Ans:Go


16. Inside a cluster, which command can list the service in the cluster?

Ans: kubectl get service dns-backend


17. How can you take a back up snapshot using the built-in snapshot method supported by etcd?

Ans:  By using the etcdctl snapshot save command.


18. Which Kubernetes object allows decoupling of an app's configuration from a Pod's specification?

Ans: ConfigMap

19. What is the load balancer in Kubernetes?

Ans: One of the most common services to expose the service in Kubernetes , there are 2 types of the load balancer 

Internal load balancer: this will manage the incoming load 

External Load balancer: This will manage the external load and direct that load to backend pods.

20. What are the main benefits that Deployments offer that Replication Controllers do not?

Ans:  Strong update and roll-back model.

21. How to validate the cluster in Kubernetes?

Ans: Kubeadm validate cluster

22. Kubeadm command to create cluster?

Ans: kubeadm init 

23. you are deploying tightly coupled containers that share the same volume and memory?

Ans: deploy the containers in the same pod

24. Command to get the detailed info?

Ans: kubectl describe pods

25. which component of K8s will register the node with cluster and wait for API server inputs?

Ans: Kubelet 

26. What is the default service type?

Ans: ClusterIP

27. What is the default protocol in the Kubernetes service?

Ans: TCP

28. Will containers share the same IP address in POD?

Ans: yes

29. How to deploy a pod in a particular node? 

Ans: Node affinity and node selector, you can deploy the pod in a particular node

30. What is headless service?

Ans: A Headless service is used to interface with the service discovery mechanism without being tied to the cluster. IP.





Nexus installation on linux

 Installation of sona type nexus on Linux server.

Sonatype Nexus System Requirements

  1. Minimum 1 VCPU & 2 GB Memory
  2. Server firewall opened for port 22 & 8081
  3. Java latest version 
  4. All Nexus processes should run as a non-root nexus user.


After login to the server 

step1: 

sudo yum update -y sudo yum install wget -y

Step2:

sudo yum install java-version-openjdk.x86_64 -y

Step3:

sudo wget -O nexus.tar.gz https://download.sonatype.com/nexus/3/latest-unix.tar.gz

Step4:

sudo tar -xvf nexus.tar.gz
sudo mv nexus-3* nexus

Step5:

sudo adduser nexus

Step6:

sudo chown -R nexus:nexus /opt/nexus sudo chown -R nexus:nexus /opt/sonatype-work

Step7:

sudo vi /app/nexus/bin/nexus.rc
run_as_user="nexus"

Step8:

sudo chkconfig nexus on
sudo systemctl start nexus


Step9:

Open the ports 22 and 8081

Step10:

http://ipaddress:8081




Tuesday 8 June 2021

Full Stack Developer Interview questions

 1) What is your favorite language and why?

  Full-stack developer means who knows or works with multiple technologies, like front end and back end and DevOps and so on.

 Pannel would like to know what is on your mind I mean which programming language you're comfortable with etc.

very famous and old HTML and CSS 

you can add JavaScript and Angular JS, React Js 

And Java and python programming languages are widely using nowadays.

you can pick any of the ones in which you are interested.


2) What are the Backend technologies?

Oracle

Mysql

SQLserver

Cassandra

MangoDB

DB2