DevOps Interview Questions
By this DevOps Interview Questions and Answers, many students are got placed in many reputed companies with high package salaries. So utilize our DevOps Interview Questions and answers to grow in your career.
Q1) what is DevOps?
By the name DevOps, it’s very clear that it’s a collaboration of Development as well as Operations. But one should know that DevOps is not a tool, or software or framework, DevOps is a Combination of Tools that helps for the automation of the whole infrastructure.
DevOps is basically an implementation of Agile methodology on the Development side as well as Operations side.
Q2) Why do we need DevOps?
To fulfill the need of delivering more and faster and better applications to meet more and more demands of users, we need DevOps. DevOps helps deployment to happen really fast compared to any other traditional tool.
Q3) Mention the key aspects or principles behind DevOps?
The key aspects or principle behind DevOps is:
Infrastructure as a Code
- Continuous Integration
- Continuous Deployment
- Continuous Monitoring
Q4) List out some of the popular tools for DevOps?
- ELK (Elasticsearch, Logstash, Kibana)
Q5) what is a version control system?
Version Control System (VCS) is software that helps software developers to work together and maintain a complete history of their work.
Some of the features of VCS as follows:
- Allow developers to work simultaneously
- Do not allow overwriting on each other changes.
- Maintain the history of every version.
There are two types of Version Control Systems:
- Central Version Control System, Ex: Git, Bitbucket
- Distributed/Decentralized Version Control System, Ex: SVN
Q6) What is Git and explain the difference between Git and SVN?
|Git is a Decentralized Version Control Tool||SVN is a Centralized Version Control Tool|
|Git contains the local repo as well as the full history of the whole project on all the||SVN relies only on the central server to store|
Q7) what language is used in Git?
Git is written in C language, and since its written in C language its very fast and reduces the overhead of runtimes.
Q8) what is SubGit?
SubGit is a tool for migrating SVN to Git. It creates a writable Git mirror of a local or remote Subversion repository and uses both Subversion and Git if you like.
Q9) How can you clone a Git repository via Jenkins?
First, we must enter the e-mail and user name for your Jenkins system, then switch into your job directory and execute the “git config” command.
Q10)What are the Advantages of Ansible?
• Agentless, it doesn’t require any extra package/daemons to be installed
• Very low overhead
• Good performance
• Very Easy to learn
• Declarative not procedural
Q11) what’s the use of Ansible?
Ansible is mainly used in IT infrastructure to manage or deploy applications to remote nodes. Let’s say we want to deploy one application in 100’s of nodes by just executing one command, then Ansible is the one actually coming into the picture but should have some knowledge on Ansible script to understand or execute the same.
Q12) what’s the difference between Ansible Playbook and Roles?
- Roles are reusable subsets of a play.
- A set of tasks for accomplishing a certain role.
- Example: common, webservers.
- Playbooks contain Plays.
- Mapps among hosts and roles.
- Example: site.yml, fooservers.yml, webservers.yml.
Q13) How do I see a list of all the ansible_ variables?
Ansible by default gathers “facts” about the machines, and these facts can be accessed in Playbooks and in templates. To see a list of all the facts that are available about a machine, you can run the “setup”
module as an ad-hoc action:
Ansible -m setup hostname
This will print out a dictionary of all the facts that are available for that particular host.
Q14) what is Docker?
Docker is a containerization technology that packages your application and all its dependencies together in the form of Containers to ensure that your application works seamlessly in any environment.
Q15) what is the Docker image?
Docker image is the source of Docker container. Or in other words, Docker images are used to create containers.
Q16) what is Docker Container?
Docker Container is the running instance of Docker Image.
Q17) Can we consider DevOps as an Agile methodology?
Of Course, we can!! The only difference between agile methodology and DevOps is that agile methodology is implemented only for the development section and DevOps implements agility in both developments as well as operations sections.
Q18) what are the advantages of using Git?
1. Data redundancy and replication
2. High availability
3. Only one. git directory per repository
4. Superior disk utilization and network performance
5. Collaboration friendly
6. Git can use any sort of project.
Q19) what is kernel?
A kernel is the lowest level of easily replaceable software that interfaces with the hardware in your computer.
Q20) what is the difference between grep -i and grep -v?
I ignore alphabet difference V accept this value
ex) ls | grep -i docker Dockerfile docker.tar.gz
ls | grep -v docker Desktop
You can’t see anything with name docker.tar.gz
Q21) How can you define a particular space to the file
This feature is generally used to give the swap space to the server. Lets say in below machine I have to create swap space of 1GB then,
dd if=/dev/zero of=/swapfile1 bs=1G count=1
Q22) what is the concept of sudo in linux?
Sudo(superuser do) is a utility for UNIX- and Linux-based systems that provide an efficient way to give specific users permission to use specific system commands at the root (most powerful) level of the system.
Q23) what is a Jenkins Pipeline?
Jenkins Pipeline (or simply “Pipeline”) is a suite of plugins that supports implementing and integrating continuous delivery pipelines into Jenkins.
Q24) How to stop and restart the Docker container?
To stop the container: docker stop container ID
Now to restart the Docker container: docker restart container ID
Q25) What platforms does Docker run on?
Docker runs on only Linux and Cloud platforms.
- Ubuntu 12.04 LTS+
- Fedora 20+
- RHEL 6.5+
- CentOS 6+
- openSUSE 12.3+
- CRUX 3.0+
- Amazon EC2
- Google Compute Engine • Microsoft Azure
Note that Docker does not run on Windows or Mac for production as there is no support, yes you can use it for testing purposes even in windows