Devops Interview
Devops Interview
Devops Interview
https://youtu.be/GX6fOvaS0Xs?si=9TkIptV-PLWNYFUB
- Share your preference for tools like Terraform, Jenkins, Ansible, Docker, Kubernetes and
Prometheus. (Popular in Demand tools)
- Briefly explain why you like them.
Describe your approach to staying current, including reading DevOps blogs, attending conferences,
and participating in online communities.
Mention your ability to quickly learn new technologies, typically within a few weeks.
If asked, can you architect an application and How quickly can you do it:
💡 Confirm your capability to architect applications and state that the timeline depends on the project's complexity.
What are some problems that you have faced while working on a project:
- Share a specific challenge you've encountered, such as underestimating infrastructure capacity, managing secrets, cost optimization etc.
- Emphasize the lesson learned from the experience.
List the Linux flavors you have experience with, such as Ubuntu, CentOS, or Amazon Linux.
Example:
Change permissions to read and write for the owner: chmod u+rw /var/www/myfile.txt
💡 I use the ps command to list processes and top to view real-time system stats.
SSH, or Secure Shell, is a secure way to remotely connect to and control Linux computers over the
internet. It keeps your data safe through encryption and authentication.
What is a cronjob:
A cronjob is a scheduled task in Unix-like operating systems. It allows you to automate repetitive
tasks by specifying when and how often they should run.
Section 3 - Networking 📶
DNS is a system that translates human-readable domain names (like example.com) into IP addresses
(like 192.168.1.1) that computers use to identify each other on the network.
Explain the differences between TCP (Transmission Control Protocol) and UDP
(User Datagram Protocol):
💡 TCP provides a reliable, connection-oriented communication with error checking and retransmission of lost data. UDP is
connectionless, faster, and used when some packet loss is acceptable, such as in real-time video streaming.
1. Physical
2. Data Link
3. Network
4. Transport
5. Session
6. Presentation
7. Application
💡 A firewall is a network security device or software that monitors and controls incoming and outgoing network traffic based
on predefined security rules. It acts as a barrier between a trusted internal network and untrusted external networks.
The ping command is used to test network connectivity by sending ICMP echo requests to a target
host and measuring the response time.
What is the ifconfig (or ipconfig on Windows) command used for, and how do
you use it to display network interface information:
Section 4 - GIT 🗃️
What is Git and how do we use it in DevOps:
Git is a distributed version control system used to track changes in source code during software
development. In DevOps, Git is used for version control, collaboration, and to automate code
deployments through CI/CD pipelines.
Explain me the workflow of how you push your code from a local machine:
The typical workflow involves the following steps:
git pull origin [branch] : Fetch changes from the remote repository.
Use git revert [commit_hash] to create a new commit that undoes the changes made by a previous
commit.
A branch in a Git repository is a separate line of development that allows multiple developers to work
on different features or bug fixes simultaneously without affecting the main codebase.
I'm familiar with AWS (Amazon Web Services), Azure, and GCP (Google Cloud Platform).
A Virtual Private Cloud (VPC) is a virtual network within a cloud provider's infrastructure that you
define and it allows you to isolate, control and deploy your resources, such as virtual servers and
databases.
What is the difference between a Public and Private Subnet and what differentiates
it:
A public subnet is accessible directly from the internet, while a private subnet is not. Public subnets
are typically used for resources that need public access, like web servers, while private subnets are
used for resources that should not be directly exposed, like databases.
What is CloudFormation:
AWS CloudFormation is a service that allows you to define and provision AWS infrastructure as code (IaC). You can create,
update, and delete AWS resources using templates written in JSON or YAML.
💡 The Terraform state file is used to keep track of the resources that Terraform manages. It stores information about the
current state of the infrastructure and helps Terraform plan and apply changes accurately.
terraform {
backend "s3" {
bucket = "my-terraform-state-bucket"
key = "terraform.tfstate"
region = "us-east-1"
encrypt = true
dynamodb_table = "my-lock-table"
}
}
Running isolated applications (containers) on a shared operating system. It's like having apartments in a single building, where
each apartment is self-contained but shares common infrastructure.
Docker solves the problem of consistent, portable, and efficient application deployment by packaging
applications and their dependencies into containers, ensuring they run reliably across different
environments and systems while maintaining security and scalability.
A Dockerfile is a script that defines the steps to create a Docker container image. It's used to
automate the containerization of an application, making it reproducible and shareable.
2. Build Image: Use docker build to build an image from the Dockerfile.
3. Run Container: Run a container from the image using docker run .
I use container orchestration tools like Kubernetes to manage multiple containers, ensuring high
availability, scalability, and load balancing.
How will you create a CICD pipeline to update the website or app on every commit
to a particular branch:
To create a CICD pipeline for this scenario, I would configure the following steps:
5. Deploy the application to a staging environment for further testing (if required).
Additionally, implement rollback mechanisms and monitoring to ensure the production environment remains stable.
Section 9 - Deployment 🚀
Staging Environment: Pre-production environment for final testing before the live environment.
💡 I roll back by deploying the previous version of the application or by using container orchestration tools to revert to the
last stable state. I also ensure comprehensive monitoring and alerts to detect failures early.
I automate deployment using scripts and CI/CD pipelines with tools like Jenkins, Travis CI, or GitLab
CI/CD. This includes building, testing, and deploying code automatically on every commit. Also
👉🏾
Note: If you found this document helpful and want to get more content like this,
please consisder SUBSCRIBING to CloudChamp on Youtube: SUBSCRIBE 👈🏾