Card image cap

Top 90 DevOps Interview Questions and Answers in 2021

By Tektutes

Published on Aug 17 2021

49

2

DevOps engineers are in high demand across multinational corporations such as Facebook, Google, and Amazon

Having DevOps skills means you are ready to start preparing for your DevOps interview. If not know about DevOps, don’t worry – our DevOps Online Training will help you to master DevOps.

In a highly competitive job market, DevOps Interview Questions can cover a wide range of difficult topics.

Perhaps you know that this is a challenging field in which some real preparation will take place. DevOps interview questions with answers will help you prepare for the most common DevOps roles within the industry.

Let us now begin 90 DevOps interview questions with answers.

General DevOps Interview Questions

 

 1. What do you know about DevOps?

By the name DevOps, it’s very clear that it’s a collaboration of Development as well as Operations. DevOps isn't exactly software, a framework, or a tool. DevOps helps to automate the infrastructure with a Combination of Tools.

Also, explain the growing importance of DevOps in the IT industry straightforwardly. Disseminate the advantages of this approach to synergize the efforts of development and operations teams to accelerate software product delivery, with a minimum failure rate. 

In your Answer, describe how DevOps helps to create value by bringing together the development and operations teams from the beginning of the product design to the point of delivery.

If I were to enlist your help in evaluating your knowledge of DevOps, I would expect you to understand how Agile and DevOps differ from one another. The next question is directed towards that.

2. What makes DevOps different from agile methodology?

DevOps is a culture where both operations and development teams work closely together. In this way, the software is developed, tested, integrated, deployed, monitored, and deployed continuously throughout its whole lifecycle.

Agile is a methodology for software development that helps eliminate gaps in communication and conflicts between the client and the developer by focusing on iterative, incremental, and small releases of software.

With DevOps, Developers and IT Ops can work together more effectively.

3. Explain the key principles and aspects behind DevOps?

The key aspects or principle behind DevOps are

  • Infrastructure as code
  • Automation
  • Security
  • Continuous Integration
  • Continuous Monitoring
  • Continuous deployment

4. Which are some of the most popular DevOps tools?

The most popular DevOps tools include:

5. Why is DevOps needed?

DevOps aims to improve application performance and meet user requirements to benefit organizations. Additionally, deploying with this tool goes much faster than with other tools.

6. What are the different phases in DevOps?

DevOps lifecycle phases include the following:

  • Plan - To begin with, you need a rough idea of the development process. Getting a general picture should be the first step.
  • Code - The application is coded according to end-user requirements. 
  • Build - Integrate the code generated in previous steps to create the application.
  • Test - Develop the application and test it. If necessary, rebuild the application.
  • Integrate - The entire code is integrated by multiple programmers.
  • Deploy - An application is deployed into the cloud environment for further usage. Any new changes are ensured to not affect high-traffic websites.
  • Operate - The code is operated on if necessary.
  • Monitor - End-user requirements are met by monitoring application performance and making the appropriate adjustments.

7. Have you worked on any DevOps tools?

Here, the answer has two possibilities (you might choose the answer with your risk):

  1. Suppose you have experience with most of the tools then your answer is like, I have worked on all these DevOps tools for developing excellent quality software and expanding that software efficiently, frequently, and certainly.
  2. Now the second possibility that, If you have to experience only with some tools. So for now your answer starting with mention those tools and say I am specialized in these tools and have an overview of the other tools.

Want to learn more about DevOps Tools then join Tektutes because it provides the best DevOps Online Training in Hyderabad. Find out when the next batch starts.

8. What is the DevOps toolchain?

Application development and deployment process are automated by a DevOps toolchain. As DevOps matures, it becomes increasingly complex, and automation becomes increasingly essential to ensure continuous delivery. A DevOps toolchain includes GitHub version control, backlog management, delivery pipelines, and other tools.

9. Can you tell me the core benefits of DevOps?

Below are the core benefits of DevOps (You can also use your past experience and explain benefits):

First, start with technical benefits are,

  • Delivering software continuously
  • Problems that are easier to manage
  • Detecting defects earlier and repairing them faster

And now business benefits are,

  • Improved delivery of features
  • The operating environment should be stable
  • Improved Collaboration between the teams.

10. How does DevOps make us more efficient?

According to me, among the most important things that DevOps does for us is speed up releasing software changes for production while reducing risks of quality assurance and compliance issues. 

However, DevOps has many other benefits. Clearer communication and better working relationship between teams lead to higher customer satisfaction. For instance, both the Ops team and the Dev team must work together to deliver good quality software.

11. How DevOps is helpful to developers?

This solution speeds up the fix and helps team members communicate clearly. In a DevOps interview, this is a basic DevOps interview question for freshers.

12. What will you do to implement DevOps on a project?

DevOps can be applied in a specific project using the following approaches:

In the first stage,

It takes approximately two to three weeks to evaluate the existing process and implementation to identify areas for improvement so that the team can create a road map for implementation.

For the second stage,

Create a proof of concept (PoC). Once it is accepted, the team can begin the actual implementation of the project and roll-out on the project.

In the last stage,

It is now time for the project to implement DevOps by following steps such as version control, integration, testing, deployment, delivery, and monitoring.

The project is now ready for DevOps implementation if you proceed by following the appropriate steps for version control, integration, testing, deployment, distribution, and monitoring.

13. What are some examples of DevOps in industry or real-life?

Countless industries are using DevOps, and you may mention the following use cases:

On Etsy, you can buy and sell items, both handmade and vintage, new or used. It is a peer-to-peer e-commerce service. A slow, painful update process caused Etsy's site to go down frequently. It affected millions of Etsy’s users selling goods on the marketplace and was likely to push them towards a competitor.

Getting help from a new technical team, Etsy transitioned away from its waterfall/weekly deployment model to an agile approach, which takes four hours. They report deploying 50 deployments a day with few disruptions today, with a fully automated deployment pipeline.

14. What is the role of configuration management in DevOps?

  • Multiple systems can be managed and changed.
  • Configures resources in a standard manner, which manages infrastructure.
  • This helps maintain the integrity of the entire infrastructure by managing multiple servers and maintaining administration and management.

15. What does continuous monitoring do for maintaining a system’s entire architecture?

An integral part of DevOps is continuous monitoring of the system infrastructure to identify any faults or threats.

  • Manages applications, services, and resources on the servers.
  • Determines whether applications are functioning correctly by monitoring the status of servers.
  • Continuous auditing, transaction inspection, and monitored monitoring are enabled with this software.

16. What is a version control system?

This software manages the history of a software development project and enables software developers to collaborate effectively together.

Here're some features of VCS (Version Control System):

  • Allowing developers to work simultaneously
  • Not allowed to overwrite each other's changes.
  • Every version should be kept in history.

VLC (Version Control Systems) fall into two categories:

  1. Central Version Control System, Ex: Git, Bitbucket
  2. Distributed/Decentralized Version Control System, Ex: SVN

17. What language is used in Git?

Git is written in the C language, making it very fast and reducing the overhead caused by runtimes.

18. What is the role of AWS in DevOps?

AWS has the following role in DevOps:

  • Flexible services - Provides ready-to-use, flexible services without the need to install or set up the software.
  • Built for scale - You can manage a single instance or scale to thousands using AWS services.
  • Automation - AWS lets you automate tasks and processes, giving you more time to innovate
  • Secure - Using AWS Identity and Access Management (IAM), you can set user permissions and policies.
  • Large partner ecosystem - AWS supports a large ecosystem of partners that integrate with and extend AWS services.

19. Name three important DevOps KPIs.

These are the three main KPIs:

  • Meantime to failure recovery - Recovering from a failure takes an average amount of time.
  • Deployment frequency - It occurs regularly. 
  • Failed deployment percentage - This is the number of times a deployment fails.

20. What is AWS DevOps?

Using AWS enables you to implement DevOps at your company and to utilize services that are specifically designed to be used in conjunction with AWS. 

By leveraging DevOps services, these teams can increase automation and manage complex environments scale-wise.

VCS (Version Control System) – DevOps Interview Questions

 21. What is VCS?

An automated system tracks change to a program and integrate the changes into existing code. This type of tool is useful to integrate new code into the existing code without interfering with other team members work since the developer makes changes to the code frequently. 

In addition to integration, the test will take care of certain bugs so that we may avoid them.

22. What are the benefits of using version control?

My recommendation is to include the following features of version control:

  1. VCS allows all team members to access any file freely at any time. Once the changes are merged, they become the common version.
  2. Within the VCS are all the past versions and variants neatly organized. Requesting an old version at a later time gives you access to the original and the current versions.
  3. VCSs requires you to describe what changes were made when you save new versions of a project. The contents of the file can also be changed, so you know exactly who has made whatever changes in the project.
  4. An open-source project management system such as Git lets each member of your team have the complete history of the project, so if your central repository breaks down, you can still access any of your team’s local repositories.

23. What are the types of Version Control Systems?

Version control systems come in three types, they are:

  • Local Version Control Systems
  • Centralized Version Control Systems
  • Distributed Version Control Systems

24. What are the benefits of using version control?

I will suggest you include the following advantages of version control:

  • Each file's entire history of changes is available.
  • In the VCS, past versions and variants are kept independently with branches, and if needed, you may merge back together with the file’s content to check the changes.

25. Describe branching strategies in DevOps.

In simple terms, branching maintains code isolation by creating two separate versions from the same source code. There are various types of branching available. Therefore, the DevOps team must make a choice depending on application requirements. This choice is called a branching strategy.

26. Which VCS tool you are comfortable with?

You can just mention the VCS tool that you have worked on like this: “I have worked on Git, and its biggest advantage over another version control system like SVN is its distributed configuration.”

There is no need for a central server to store the versions of all files in a distributed version control system. Developers “clone” repositories instead, which means they have a copy of every version of the project on their computer.

27. What is Git?

Version control systems such as Git make it easy for developers to keep track of software changes. It organizes a project in a directory that is periodically updated. The repository is a data structure that stores these files.

28. Can you tell me the importance of Git through its benefits to organizations?

Yes, so it's

  • Feature branch workflow
  • Distributed development
  • Pull requests
  • Replication and redundancy of data
  • High availability
  • Improved disk utilization and network performance
  • Collaboration friendly

29. What is the process for reverting a commit that has been made public in Git?

Please include both possible answers since any of the following options may be used depending on the situation:

  • The simplest way to resolve an error is to commit the corrected file to the remote repository. Once you have made the necessary changes to the file, commit it to the remote repository for that I will use
  • git commit -m “commit message”
  • Use the following command to undo all changes made in the bad commit.
  • git revert

30. Is there a way to combine the last N commits into a single commit?

Two options exist to squash many commits into a single one. Please include both of the following options:

  • If you want to write the new commit message from scratch use the following command
  • git reset –soft HEAD~N &&
  • git commit
  • If you want to start editing the new commit message with a concatenation of the existing commit messages then you need to extract those messages and pass them to Git commit for that I will use
  • git reset –soft HEAD~N &&
  • git commit –edit -m”$(git log –format=%B –reverse .HEAD@{N})”

31. How can Git bisect be used to identify the (regression) bug's source?

You should give a brief explanation of Git bisect. A git abstract searches for bug introducers by using a binary search

git bisect

Tell us what the command you mentioned will do, it will use a binary search algorithm to find out which commit in your project’s history introduced the bug. A "bad" commit with the bug is told to the software first, and a "good" commit that was made before the bug was introduced is then given to it. 

A commit is selected between those two ends and Git bisect asks you if it's a good or a bad commit. Until it finds the precise commit that made the change, the search continues narrowing down the range.

32. What is Git rebase and how can it be used to solve conflicts before merging a feature branch?

My recommendation is to begin by describing git rebase as a command which will merge another branch with the branch where you are currently working. The merged branch will keep the commits you made in the current branch and move them to the top of the history on the merged branch.

Assuming the master branch has forked since before the feature branch was created, Git rebases can now be used to move the feature branch to the tip of the master.

A feature branch will effectively replay changes made in the master branch to resolve conflicts along the way. Feature branches that are merged carefully will allow the master to be merged into them with ease and in some cases as a straightforward fast-forward operation.

33. How do you do code sanity checks on a Git repository before you commit changes, and stop commits if the test fails to pass?

You should first give a short explanation of sanity-checking, called smoke-testing, which determines if the test is possible and reasonable to continue.

Now, explain how this can be achieved. A simple script in the repository's pre-commit hook can accomplish this. Even before you enter a commit message, the pre-commit hook is triggered. 

One can run other tools with this script, such as lines, and run sanity checks on the changes in the repository before committing them.

The following script can be used as an example:

#!/bin/sh

files=$(git diff –cached –name-only –diff-filter=ACM | grep ‘.go$’)

if [ -z files ]; then

exit 0

fi

unfmtd=$(gofmt -l $files)

if [ -z unfmtd ]; then

exit 0

fi

echo “Some .go files are not fmt’d”

exit 1

When a .go file is about to be committed, this script checks whether it needs to be run through the standard Go code formatting tool gofmt.

34. What happened when a branch was merged into master in Git?

Here are two commands you might want to incorporate:

  • git branch –merged lists the branches that have been merged into the current branch.
  • git branch –no-merged lists the branches that have not been merged.

Continuous Integration – DevOps Interview Questions

35. What’s the main purpose of Continuous Integration (CI)?

An automated process for maintaining software projects, continuous integration is a way of integrating changes from multiple contributors. Integrating regularly allows you to detect errors quickly and track them down easily. The CI process revolves around source code version control.

36. Why do you need a Continuous Integration of Dev & Testing?

In this answer, you will need to emphasize the necessity of Continuous Integration. 

I suggest that you explain the following in your answer:

Continuous Integration replaces the traditional practice of testing after all development to improve software quality and speed it up. This allows the development team to detect and locate problems before they are too late since code needs to be integrated several times a day (more frequently). All checks-in are then tested automatically.

37. What are the benefits of Continuous Integration?

Continuous Integration has the following major advantages:

  • A faster development cycle
  • Smarter risk mitigation
  • Stable codes
  • Team Communication
  • Reduced Overhead
  • Flexibility 
  • Consistency of Build Process

38. Explain how you can move or copy Jenkins from one server to another?

This task will be accomplished by copying the jobs directory from the old server to the new one. This can be done in multiple ways; I've listed them below:

  • Simply copy the corresponding job directory from one Jenkins installation to another to move a job from one installation to another.
  • You can clone an existing job directory using a different name to make a copy of it.
  • It is important to note that renaming a job will affect other jobs that are trying to call the renamed job.

39. How to create a backup and copy files in Jenkins?

Below is a guide to creating a backup and copying files in Jenkins:

  • Backup your JENKINS_HOME directory periodically. This directory contains everything you need to build an application, from a job configuration to slave configurations.
  • This directory can be used to create a backup of your Jenkins setup. Also, you can copy a job directory to clone, replicate, or rename a job.

40. Can You Explain how can set up Jenkins job?

First, I will have a look at how to set up a Jenkins job. You can start Jenkins by selecting “New Job”, then “Build a freestyle software project”.

Then you can tell the elements of this freestyle job:

  • An optional source code repository, such as CVS or Subversion.
  • You can control Jenkins to perform builds by enabling triggers.
  • Some sort of build script that performs the build (ant, maven, shell script, batch file, etc.) where the real work happens.
  • You can also archive artifacts of the build or record the javadoc and test results.
  • Sending an e-mail, IM, or updating the issue tracker are all ways that can help notify other people and systems of the build result.

41. What is Trunk-Based development? 

Trunk-based development is a source control branching model for software development using a single branch (called trunk) in which all developers are connected. The trunk is then assembled from several development branches by using documented techniques. 

These processes enable continuous integration and, therefore, continuous delivery. It is known as Trunk-Base Development.

42. Mention some of the useful plugins in Jenkins.

Here are a few essential plugins:

  • Maven 2 project
  • Amazon EC2
  • HTML publisher
  • Copy artifact
  • Join
  • Green Balls

There are several other plugins that you can use besides the ones mentioned above. Feel free to add them as well. However, if you're going to use your plugin, continue by first mentioning the ones above.

43. How to create a new build job in Jenkins?

Below are the steps to help you understand Jenkins jobs:

  • Step1: Launch the Jenkins dashboard by clicking on the new item in the top left corner of the dashboard.
  • Step2: Select the freestyle project by entering the item name in the box provided.
  • Step3: Please enter the project details you wish to test.
  • Step4: Under source code management, enter the URL of your repository.
  • Step5: Add a new build step by clicking the add build step button, and then click Run Batch Command.
  • Step6: Save the project after you enter the data and click the apply button. 
  • Step7: Building the source code is as easy as clicking on Build now.
  • Step8: Click on Build number and click Console Output to see the status of the build.

44. Can we build multiple jobs at a time using Jenkins?

Several jobs or projects can be built simultaneously with the Jenkins plugin. Other jobs are automatically implemented after the parent job is completed. Pipeline plugins for multiple branches are used to generate jobs automatically.

Continuous Testing – DevOps Interview Questions

Next, we'll talk about continuous testing.

45. What is Continuous Testing? Explain its benefits.

In continuous testing, automated tests are executed as part of the software delivery lifecycle to obtain business feedback on risks associated with software releases. Continuous testing aims to detect any problems early in the SDLC process.

The benefits of continuous testing are listed below:

  • Mitigates business risks.
  • This improves the code quality.
  • The process is reliable and agile.
  • The virtualization of services enables access to the test environment.
  • Consistency in all tests is achieved through the same configuration.

46. How do you define Automation Testing? 

A software testing technique called Automation Testing or Test Automation. Automation of testing tasks and repetitive tasks is an important feature of it. There are separate tools for testing, which enables the development of test scripts to measure actual and expected outcomes.

47. How does Automation Testing benefit you?

The following are some of the major benefits of automation testing:

  • Covers a wider range of application features than before
  • Ensures consistency
  • Allows parallel execution
  • Efficiencies are improved
  • Reusable scripts
  • Saves money and time
  • Reliable results

48. How does DevOps incorporate testing?

All developer changes to the source code need to be committed to the shared repository in DevOps. In Continuous Integration projects, Continuous Testing is done by tools like Selenium using tools like Jenkins, Continuous Integration tools pull the code from the shared repository as changes are made in the code.

By doing this, instead of the traditional approach, any changes in the code are continuously tested.

49. List the best Continuous Testing tools?

The following are the best Continuous Testing tools:

  • Selenium
  • Watir
  • Tosca
  • Katalon Studio
  • Eggplant

50. Can Selenium test an application on an Android browser?

Using Selenium, an Android developer can test an application on an Android device. Testing Native apps or Web apps using the Selendroid framework or Appium framework is possible in the Android browser.

51. Mention the testing types supported by Selenium?

Functional and regression testing can be performed on Selenium.

  • Functional Testing: The software application's functionality is compared with the functional specifications/requirements.
  • Regression Testing: Here, test situations are repeated to make certain the application is functioning properly.

52. What are the steps to launch the browser using WebDriver?

1. For Firefox:

WebDriver driver = new FirefoxDriver();

2. For Chrome:

WebDriver driver = new ChromeDriver();

3. For Internet Explorer (IE):

WebDriver driver = new InternetExplorerDriver();

53. Why is Continuous Testing essential for DevOps?

This question can be answered by saying that continuous testing makes all changes to the code immediately testable. By doing this, you avoid the risks of release delays caused by big-bang testing, such as quality issues. As a result, Continuous Testing allows for “more frequent and good quality releases.”

If you're looking for hands-on learning and 24-7 lifetime support while you learn DevOps, make sure you take a look at our DevOps Certification program.

54. How can you access the text of a web element?

Use the Get command to get a string representation of the element's text. This command doesn't return any parameters but will return a string value.

Used for:

  • Messages must be verified
  • Labels
  • The website displays errors

Syntax: 

String Text=driver.findElement(By.id(“text”)).getText();

55. What is Selenium IDE?

Let's start this answer off by defining Selenium IDE. It's a tool for creating, editing and debugging Selenium scripts. It's an extension for Firefox. With Selenium IDE, you have access to the whole Selenium Core, making it easy to develop and run your tests in the environment in which they will be executed.

Put your advantages in there. Selenium IDE also supports autocomplete and allows you to move commands around quickly, so you can create any type of Selenium test.

56. What’s the difference between Continuous Delivery and Continuous Deployment?

Continuous Delivery: Software development, which uses continuous integration and automated testing, can be rapidly and reliably built, tested, and released with minimal manual overhead.

Continuous Deployment: 

This process is used to deploy correct changes to the architecture or code of a product without human intervention.

57. Which command is better in Selenium - Assert or Verify?

Below I have described the difference between Assert and Verify commands:

  • We may declare that an element is or is not present on a web page by using the assertion command. The next test step is executed if the condition is true. However, if it is false, the execution is stopped, and no further test is run.
  • In the Verify command, the condition is also checked whether it is true or false. As long as it is true, the program’s execution does not halt, meaning that any failure during verification would still be taken to completion.

58. How do you launch the browser using WebDriver?

The following syntax can be used to launch Browser:

WebDriver driver = new FirefoxDriver();

WebDriver driver = new ChromeDriver();

WebDriver driver = new InternetExplorerDriver();

59. When should I use Selenium Grid?

Let me suggest you define Selenium Grid in this answer. Distributed testing can be achieved using multiple platforms and browsers concurrently, enabling the same or different test scripts to be executed; in this way, test execution would be distributed. Using this technology, it is possible to test under different environments while significantly reducing the execution time.

Our live online instructor-led DevOps Certification course teaches Automation testing and other DevOps concepts.

60. Is the following option a method of WebElement?

  1. getText()
  2. size()
  3. getTagName()
  4. sendKeys()

size() is not the method of WebElement.

61. When do we use findElement() and findElements()?

findElement()

On the current web page, it finds the first element with the locator value specified.

Syntax:

WebElement element=driver.findElements(By.xpath(“//div[@id=‘example’]//ul//li”));

findElements()

It finds all elements that match the locator value specified in the current web page.

Syntax:

List elementList=driver.findElements(By.xpath(“//div[@id=‘example’]//ul//li”));

62. Do you know how to submit a form with Selenium?

Yes, I Know. Using Selenium, you can submit a form using the following lines of code:

WebElement el = driver.findElement(By.id(“ElementID”));

el.submit();

Configuration Management - DevOps Interview Questions 

 63. What is the objective of Configuration Management?

By making the development/deployment processes reliable and controllable by Continuous Management, the objective is to produce high-quality software.

Configuration systems are made up of different components ranging from servers, networking, storage, and software. Their primary objective is to maintain target systems and software to the desired state.

64. Why is Infrastructure as code important? 

Essentially, this means managing and provisioning infrastructure (networks, databases, connections, and topologies) through source code instead of manually or interactively.

Automated infrastructure deployments can be achieved reliably, consistently, and easily with this tool.

65. How does configuration management differ from provisioning infrastructure?

The DevOps toolchain is incomplete without configuration management and provisioning infrastructure. Provisioning helps you create, modify, delete, and track infrastructure using APIs or code instead of configuration management when you want to employ desired configurations on target machines or groups of machines.

66. How does Puppet work?

Using Puppet, one can deploy, configure, and manage servers. Based on client-server architecture, clients serve as agents, while servers are known as masters.

Puppet agents and masters communicate via an SSL-encrypted, secure channel.

67. What is a Puppet Manifest?

There is a Puppet node and Puppet Agents, both of which are implemented in Puppet Master. In Puppet Master, the nodes and agents have their configuration details written in Puppet language. 

Puppet manifests are details that describe the resources that should be configured in a language puppet can understand.

The Puppet Manifest defines resources on a node that define the state to be applied on it. They are building blocks for more complex modules.

68. How does Puppet Module differ from Puppet Manifests?

An individual Puppet Module consists of manifests and data. Their directory structure permits Puppet to load the appropriate custom types, defined types, and tasks. The name of the Module and its installed in the Puppet path are necessary.

A Puppet manifest is simply a Puppet code. It has the .PP extension.

69. How can you configure systems with Puppet?

Puppet offers two ways to configure systems: 

The first is that in both client and server architecture, Puppet agents and masters should be used.

In the second scenario, Puppet should be utilized in a stand-alone architecture.

70. How does Factor work in Puppet?

Factors are Puppet's cross-platform system profiling library. Factors are how Puppet gathers system information while running.

Several factors like network settings, IP addresses, hardware details, etc., are discovered and reported by Factor, and these are embedded in Puppet manifests in the form of variables.

71. What is Chef?

Let's start with defining Chef. It's a powerful platform for automating infrastructure. Chef lets you write scripts to automate processes.

72. Explain Chef Resources.

We'll start by looking at chef resources. A chef resource describes a system component at its desired state. This is a configuration policy statement for representing what a node should look like when using the resource providers in its current configuration.

The functions of a Chef Resource are listed below:

  • Having the machine's current status helps a lot.
  • Gets the target machine to the desired state by describing the steps to be taken.
  • Resource types such as templates, packages, files, and services.

73. What is meant by recipe in Chef?

For this answer, I would suggest defining the Recipe first. Recipes are collections of documents that describe a distinct form or policy. Recipes describe how to configure a particular part of a system.

Include the following points in the explanation of Recipes' functions after the definition:

  • The software will be installed and configured.
  • File management.
  • Develop and deploy applications.
  • Exercising other recipes.

73. How does a Cookbook differ from a Recipe in Chef?

The answer to this question is simple: “Recipes are collections of Resources, primarily used to configure an application, set up a machine, or host another service.”

74. How does Ansible work?

By default, Ansible modules are executed through SSH with Ansible connected to the target node. Then, they are removed.

It can handle multiple nodes connected to the same system utilizing Ansible playbooks. Multiple tasks can be performed using playbooks, and the Playbooks are represented in YAML.

75. How Ansible playbook is different from ad-hoc commands?

A playbook is a scaffolding of scripts that describes the configuration of a server. Its purpose is to automate complex tasks.

An ad hoc command is used to accomplish a task quickly, mostly used only once.

76. What is the Ansible module?

Ansible functions in the form of modules which typically run as a standalone program in Python, Perl, Ruby, bash, etc. Modules have idempotency, meaning they won't go out of state, even when repeated.

77. What are playbooks in Ansible?

Ansible's orchestration language is playbooks. A playbook can be used to describe a policy you want remote systems to implement or a set of steps in a general process of managing IT resources. Playbooks are used to configure and deploy servers remotely in a basic manner.

78. How to get a list of Ansible predefined variables?

Playbooks and templates provide access to the machine facts that Ansible stores by default. The following ad-hoc action will print all the relevant facts about a machine: 

Ansible -m setup hostname

These facts will be displayed for every host.

79. What are Ansible Handlers?

A handler is exactly like a regular task inside an Ansible playbook, but it runs only if a notify directive is given, and if something changes a handler may provide more information.

Continuous Monitoring – DevOps Interview Questions

80. What is the purpose of Continuous Monitoring?

By assessing the vulnerabilities within a threat space, Continuous Monitoring can predict the security implications of planned and unexpected changes.

These reports provide data about how the application performs and is used.

81. Which are the best Continuous Monitoring tools?

Following are the best tools for Continuous Monitoring:

  • Nagios
  • Tenable
  • Spiceworks
  • Snort
  • Solarwinds
  • Lansweeper

82. What is Nagios?

First, you would mention that Nagios is among the monitoring tools. In a DevOps culture, continuous monitoring is used to detect errors, bugs, and fraud. During a failure, Nagios can alert technicians to the problem, thus preventing costly outages from negatively affecting end-users, customers, or business processes. Nagios protects your organization from undetected infrastructure outages.

83. How do Nagios works?

This answer is explained below:

In Nagios, the plugins are installed on a server, and Nagios periodically runs the checks on your network or the internet. They contact hosts or servers and release status information through a web interface. You can receive email or SMS notifications if anything happens.

It acts as a scheduler for the execution of scripts at certain times. It stores the output of those scripts in a database and can run new scripts in response to those changes.

84. What are Plugins in Nagios?

In this answer, we will discuss what Plugins are. They are scripts that can be run from a command line to check on a host or service. A Nagios plugin keeps track of the network’s hosts and services using the results from plugins.

When you have defined Plugins, explain their uses, if any. Nagios will execute a Plugin whenever it needs to perform a status check on a host or service. The Plugin will perform the check, and then only return the Plugin results to Nagios.

85. What do you mean by passive check in Nagios?

The answer, in my opinion, should begin by explaining Passive checks. Through external applications/processes, Passive checks are initiated and carried out by Nagios. Their results are then submitted to Nagios for evaluation and processing.

Explanation of passive checks for monitoring services that cannot be monitored by regularly polling status regularly since these services are Asynchronous. Monitor services behind firewalls that can't be monitored from a monitoring host can also be assigned to them.

86. What does 'object-oriented' mean in the context of Nagios?

The answer to this question is pretty direct. Nagios has a feature called object configuration format, which allows you to define objects which share properties from others, hence the name. Hence it clarifies the relationship between various components.”

Containerization and Virtualization - DevOps Interview Questions 

 87. What are containers?

A container is simply a runtime environment containing everything that is needed to run an application, such as libraries and other binaries, and the configuration files that are needed to run them. Using containerization, you can resolve differences in operating systems and the infrastructure they use.

88. What are the advantages that Containerization provides over virtualization?

These are some advantages of virtualization over containerization:

  1. Virtual machines, on the other hand, provide slow provisioning
  2. When compared to VMs, containers are lightweight
  3. Containers offer better performance than virtual machines.
  4. Compared to VMs, containers utilize resources more efficiently.

89. What is a Docker image?

The following flow is recommended:

The Docker container starts with the Docker image. In other words, Docker images are used to make containers. Images can be built using the build command but don't produce containers on their own. The Docker registry handles the storage of Docker images, which can be very large. Images are created by layering other images, therefore enabling minimal data to be sent when transferring images over a network.

90. What is a Docker hub?

The answer to the question is pretty simple. Docker hubs are public cloud-based services that help you build your images from code repositories, manage your code repositories, store images you have manually pushed, and link to Docker cloud for deployments to your hosts. With it, the deployment pipeline can be fully automated including discovery, distribution, and change management.

I hope these questions and answers will help you with your interview. We will add more questions from time to time, if you have any specific questions in your mind just ask in the comment section we will surely answer them.

Also if you are finding DevOps jobs in Hyderabad just click on the link and read it. Want to learn DevOps with the best trainer in the industry? let's join our demo class here.

Recommended blogs for you
Add your review
Comments
No comments found