Devops Interview Questions and Answer
Devops Interview Questions and Answer
1. What is Devops?
(Development +
Operations)
Automation in all stages of Software Development life cycle.
Increase’s speed of delivering applications
Benefits:
Faster Deployment Time
Collaborative Work
environment Defect fixes at
an early Stage Quick
Releases
1
3. What is the role of Configuration Management? Some examples?
2
5. Can you name some of CI/CD Tools?
Jenkins, Gitlab, Azure Devops Pipeline,ArgoCD,Circle ci etc
6. What is Docker?
[OS+Libraries] Packaged
3
7. What is Docker File?
Contains Instruction for creating Docker Image
Example
FROM nginx
COPY index.html
build -t test:v1 .
5
What is Kubernetes?
6
10. What are the differences between
Containerization and Virtualization?
Virtualization Containerization
Developers can run multiple Deploy multiple applications
operating systems on the under the same operating
hardware of single physical system on single physical
server server
Monitoring Observability
Tracking and Data Collection Use findings (data)from
helps Devops Team better Monitoring to diagnose
understand the current state problems and actively
of system resolve them through
debugging.
Proactive and take actions
(Artificial Intelligence)
Ex: Prometheus,grafana Ex:
Prometheus,grafana,Newreli
c
7
21)How do you monitor the performance of
Application and Infrastructure?
Application → Prometheus,Grafana/Datadog/Dynatrace
Infrastructure - Prometheus,Grafana
8
In case of application failure in Kubernetes we can use
helm rollback command
Monolithic Microservice
Single (often massive) unit A microservice is an
where all functions and architectural style that
services are interconnected structures an application as
and run as a single process. a collection of small, loosely
coupled, and independently
deployable services
9
27)Difference between Horizontal scaling Vs Vertical Scaling
10
ii) Storing secrets in environment variables managed by the
CI/CD tool.
11
29)Difference between Gitops and Traditional CICD
GitOps emphasizes a
declarative approach
where the desired
state is defined in Git
12
30)What are main components of Kubernetes Cluster?
MASTER NODE
COMPONENTS
WORKER NODE
COMPONENTS
13
OTHERS
31)What is Autoscaling?
15
33)What is VPC?
Creating and isolating resources within Virtual Private Clouds
(VPCs), organizing them into subnets, and controlling traffic using
security groups and network ACLs.
One of the great qualities of this model is that you pay only for
the compute time your code actually uses, rather than for pre-
allocated infrastructure
17
Ping: to check if ansible hosts are reachable
Setup: to gather information about Target hosts
ansible remotehost -m setup -u ec2-user
Command: To execute commands on remote Node
Script: To execute scripts
Copy: to copy files from remote source
Get_url: Download files using http remote url
File: creates files
Blockinfile: Insert/update/remove block of
multiline text
Debug: For debugging variables/expression and
print execution
18
37) What is Devsecops?
Implement security in a DevOps pipeline (DevSecOps) and
integrate security practices throughout the development and
deployment process.
Kubernetes APIs.
19
it's created. Inodes are stored in blocks, just like files are stored
in units of a given size.
20
40)What is /etc/fstab used
for? Used to mount file
system
21
42)What are iptables in linux?
22
It is a firewall to allow and deny access to certain services/ports
Example:
sudo iptables -A INPUT -s 203.0.113.51 -j REJECT
sudo iptables -A INPUT -p tcp --dport 22 -m conntrack --ctstate
NEW,ESTABLISHED -j ACCEPT
iptables -A INPUT -p tcp --dport 80 -m conntrack --ctstate
NEW,ESTABLISHED -j ACCEPT
Commands:
cgcreate -g cpu,memory:/<cgroup_name>. #Creating a cgroup
with the user or users you want to control.
cgset -r cpu.cfs_quota_us=50000 -r memory.limit_in_bytes=1G
<cgroup_name>. # Limit CPU usage to 50% and memory usage
to 1GB: cgclassify -g cpu,memory:<cgroup_name> <username>
#add a user to the cgroup.
find /path/to/directory -type f -mmin -30. # Find all files that are
modified in last 30 minutes
23
netstat -tulp # List open ports in linux server
24
grep <pattern># Search pattern in Text files
25
49)What databases familiar?
26
Mysql,postgres,Oracle
# Command to Take mysql backup of a database
mysqldump -u [uname] -p db_name >
db_backup.sql.
27