Interview Questions

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 3

GO LANG

- What is the usage of break statement in Go programming language?

The break statement is used to terminate the for loop or switch statement and transfer execution to the
statement immediately following the for loop or switch.

- What is the usage of continue statement in Go programming language?

The continue statement facilitates the loop to skip the remainder of its body and immediately retest its
condition prior to reiterating.

- Explain static type declaration of variable in Go programming language?

Static type variable declaration is used to provide assurance to the compiler that there is one variable in
the given type and name so that there is no need for compiler to know complete detail about the
variable for further processing. A variable declaration has its meaning at the time of compilation only,
compiler needs actual variable declaration at the time of linking of the program.

KUBERNETES

- Can you explain clusters in Kubernetes?

Answer: Kubernetes helps in enforcing desired state management. This means that a particular
configuration could be fed into cluster services, and then the cluster services have the privilege to
execute the configuration in the infrastructure. Deployment files have the configurations that need to
be fed to the cluster services. When the deployment file is fed to the API, the clusters are required to
figure the scheduling of pods in the environment and ensuring their execution. Therefore, Kubernetes
cluster includes the API, worker nodes, and the Kubelet process run by the nodes.

- What do you know about a node in Kubernetes?

Answer: You would also get Kubernetes interview questions like this in your interview! The answer may
go like, a node can be defined as the main worker machine in a Kubernetes cluster and is also known as
minions. Nodes could be executed on a VM or a physical machine, and they provide the necessary
services for running pods. The master in a Kubernetes system has the privileges for managing a node.

- What are the components in Kubernetes Architecture?

Answer: Do the latest Kubernetes interview questions focus on Kubernetes architecture like “What are
the components in Kubernetes Architecture”? Of course, yes! And the response suggests that there are
two major components known as the master node and the worker node. Each of the components, in
turn, have individual components in them.
MICROSERVICES

- What are RESTful web services and explain their benefits too?

RESTful web services or Representation State Transfer web services can be defined as the architectural
style helping computer systems to communicate together over the internet. The REST web services
make it easy to understand and implement the Microservices.

Microservices can always be implemented with or without REST APIs. For easy implementation, this is
always recommended using REST APIs.

- How will you define the Distributed Transactions?

This is the situation where a single event results in the mutation of two or more sources of separate data
that cannot be committed automatically.

- List down the pros and cons of a Microservice Architecture.

What are the pros?

It has the freedom to use different technologies.

Each Microservices will focus on single capability only.

It supports individual deployable units.

It allows frequent releases of a software application.

It gives maximum security to each of the services.

It is possible developing and deploying multiple services together.

What are the cons?

The troubleshooting challenges will increase.

It will increase delays due to remote calls.

The configuration options are not possible to manage.

It is difficult to maintain transaction safety.

Data cannot be tracked across different boundaries.

There is a tough coding between multiple microservices.

- When designing Microservices, what are best practices to follow?

Here are the best practices that every developer should follow when designing Microservices.

The data store should always be kept separated from each Microservice.
The code should be arranged at a similar level of maturity.

A separate build should be designed for each Microservice.

Each build should be deployed into containers.

The server should always be treated as stateless.

You might also like