DevOps interview questions for experienced/DevOps Interview Questions and Answers for Freshers & Experienced

What is kubectl?

By definition, kubectl is a command-line interface for running commands against Kubernetes clusters. Here, ‘ctl’ stands for ‘control’. This ‘kubectl’ command-line interface can be used to deploy applications, inspect and manage cluster resources, and view logs.

What is Nagios Log Server?

Nagios Log Server simplifies the process of searching the log data. Nagios Log Server is the best choice to perform tasks such as setting up alerts, notifying when potential threats arise, simply querying the log data, and quickly auditing any system. With Nagios Log Server, we can get all of our log data in one location with high availability.

What is NRPE in Nagios?

NRPE stands for ‘Nagios Remote Plugin Executor’. As the name suggests, it allows you to execute Nagios plugins remotely on other Linux or Unix machines.
It can be helpful in monitoring remote machine performance metrics such as disk usage, CPU load, etc. It can communicate with some of the Windows agent addons. We can execute scripts and check metrics on remote Windows machines as well.

What is the concept of sudo in Linux?

Sudo is a program for Unix/Linux-based systems that provides the ability to allow specific users to use specific system commands in the system’s root level. It is an abbreviation of ‘super user do’, where ‘super user’ means the ‘root user’.

Have you heard about Ansible Galaxy? What does it do?

es, I have. Ansible Galaxy refers to the ‘Galaxy website’ by Ansible, where users share Ansible roles. It is used to install, create, and manage Ansible roles.

Can you tell me what a Puppet codedir is?

It is the main directory for code and data in Puppet. It consists of environments (containing manifests and modules), a global modules directory for all the environments, and your Hiera data.

What is a Puppet Module? How is it different from the Puppet Manifest?

A Puppet Module is nothing but a collection of manifests and data (e.g., facts, files, and templates). Puppet Modules have a specific directory structure. They are useful for organizing the Puppet code because with Puppet Modules we can split the Puppet code into multiple manifests. It is considered as the best practice to use Puppet Modules to organize almost all of your Puppet Manifests.

I have 40 jobs in the Jenkins dashboard and I need to build them all at once. Is it possible?

Yes, it is. With the help of a Jenkins plugin, we can build projects one after the other. If one parent job is carried out, then automatically other jobs are also run. We also have the option to use Jenkins Pipeline jobs for the same.

Explain Resilience Test

Test that ensures recovery without data and functionality loss after a failure is called Resiliency tests.

Explain Pair Programming with reference to DevOps

Pair programming is an engineering practice of Extreme Programming Rules. In this method, two programmers work on the same system, on the same design/algorithm/code.

One programmer act as a “driver.” Other acts as an “observer” who continuously monitor the progress of a project to identify problems. The roles can be reversed at any point of time without any prior intimation.

What is CBD’?

CBD or Component-Based Development is a unique way to approach product development. In this method, developers always look for existing well defined, tested, and verified components to compose and assemble them to a product instead of developing from scratch.

Name two tools which are used for docker networking.

For docker networking, you can use Kubernetes and Docker swarm.

What is the easiest method to build a small cloud?

VMfres is one of the most effective options for making IaaS cloud from Virtual Box VMs in no time. However, if you want lightweight PaaS, then Dokku is a good option because bash script can be PaaS out of Dokku containers.

What is post mortem meeting with reference to DevOps?

Post mortem meeting is done to discuss what went wrong and what steps you need to take in order to avoid failures.

What are the containers?

Containers are from of lightweight virtualization. They offer isolation among processes.

What are the containers?

Containers are from of lightweight virtualization. They offer isolation among processes.

Explain Blue/Green Deployment Pattern

Blue/Green coloring pattern addresses the most important challenges faced during the automatic deployment process. In Blue/ Green Deployment approach, you need to ensure two identical production environment. However, only one among them is LIVE at any given point of time. The LIVE environment is called Blue environment.

When the team prepares the next release of their software, they conduct their final stage of testing in an environment which is known as Green environment. Once verified, the traffic is routed to the Green environment.

When a server gets shut down does data stored in Memcached is still available?

Data stored in Memcached is not durable, so if a server is shut down or restarted, then all the data stored in Memcached is deleted.

Explain how Memcached should not be used?

<> Memcached common misuse is to use it as a data store, and not as a cache
<> Never use Memcached as the only source of the information you need to run your application. Data should always be available through another source as well
<> Memcached is just a key or value store and cannot perform a query over the data or iterate over the contents to extract information
<> Memcached does not offer any form of security either in encryption or authentication

Explain what Dogpile effect is? How can you prevent this effect?

Dogpile effect is referred to the event when a cache expires, and websites are hit by the multiple requests made by the client at the same time. This effect can be prevented by using a semaphore lock. In this system when value expires, the first process acquires the lock and starts generating new value.

Describe the difference between driver.close() and driver.quit().

The driver.close command closes the focused browser window. But, the driver.quit command calls the driver.dispose method which closes all browser windows and also ends the WebDriver session.

Can you tell me, what Continuous Testing and Automation Testing are?

Automation testing, as the name suggests, is a process of automating the manual process of testing. It involves the use of separate testing tools that let developers create test scripts that can be executed repeatedly without any manual intervention.

I want to move or copy Jenkins from one server to another. Is it possible? If yes, how?

I would suggest copying the Jenkins jobs directory from the old server to the new one. We can just move a job from one installation of Jenkins to another by just copying the corresponding job directory.

Or, we can also make a copy of an existing Jenkins job by making a clone of that job directory in a different name.

How is a bare repository different from the standard way of initializing a Git repository?

Using the standard method:

git init

>> You create a working directory with git init
>> A .git subfolder is created with all the git-related revision history
Using the bare way

git init --bare

>> It does not contain any working or checked out a copy of source files
>> Bare repositories store git revision history in the root folder of your repository, instead of the .git subfolder

How do you push a file from your local system to the GitHub repository using Git?

First, connect the local repository to your remote repository:

git remote add origin [copied web address]

// Ex: git remote add origin https://github.com/Simplilearn-github/test.git

Second, push your file to the remote repository:

git push origin master

Can you explain the architecture of Jenkins?

Jenkins follows the master-slave architecture. The master pulls the latest code from the GitHub repository whenever there is a commitment made to the code. The master requests slaves to perform operations like build, test and run and produce test case reports. This workload is distributed to all the slaves in a uniform manner.

What is Git rebase and how can it be used to resolve conflicts in a feature branch before merge?

According to me, you should start by saying git rebase is a command which will merge another branch into the branch where you are currently working, and move all of the local commits that are ahead of the rebased branch to the top of the history on that branch.
Now once you have defined Git rebase time for an example to show how it can be used to resolve conflicts in a feature branch before merge, if a feature branch was created from master, and since then the master branch has received new commits, Git rebase can be used to move the feature branch to the tip of master.
The command effectively will replay the changes made in the feature branch at the tip of master, allowing conflicts to be resolved in the process. When done with care, this will allow the feature branch to be merged into master with relative ease and sometimes as a simple fast-forward operation.

What is the concept behind sudo in Linux OS?

Sudo stands for ‘superuser do’ where the superuser is the root user of Linux. It is a program for Linux/Unix-based systems that gives provision to allow the users with superuser roles to use certain system commands at their root level.

Do you know about post mortem meetings in DevOps?

Post Mortem meetings are those that are arranged to discuss if certain things go wrong while implementing the DevOps methodology. When this meeting is conducted, it is expected that the team has to arrive at steps that need to be taken in order to avoid the failure(s) in the future.

Explain how you can update Memcached when data changes?

When data changes you can update Memcached by

>> Clearing the Cache proactively: Clearing the cache when an insert or update is made.

>> Resetting the Cache:It is similar to the first method but rather than just deleting the keys and waiting for the next request for the data to refresh the cache, reset the values after the insert or update.

Explain the difference between a centralized and distributed version control system (VCS).

Centralized Version Control System

>> All file versions are stored on a central server
>> No developer has a copy of all files on a local system
>> If the central server crashes, all data from the project will be lost

What is Git bisect? How can you use it to determine the source of a (regression) bug?

I will suggest you to first give a small definition of Git bisect, Git bisect is used to find the commit that introduced a bug by using binary search. Command for Git bisect is
git bisect <subcommand> <options>
Now since you have mentioned the command above, explain what this command will do, This command uses a binary search algorithm to find which commit in your project’s history introduced a bug. You use it by first telling it a “bad” commit that is known to contain the bug, and a “good” commit that is known to be before the bug was introduced. Then Git bisect picks a commit between those two endpoints and asks you whether the selected commit is “good” or “bad”. It continues narrowing down the range until it finds the exact commit that introduced the change.

Explain how you can minimize the Memcached server outages?

<> When one instance fails, several of them go down, and this will put a larger load on the database server when lost data is reloaded as a client make a request. To avoid this, if your code has been written to minimize cache stampedes then it will leave a minimal impact.

<> Another way is to bring up an instance of Memcached on a new machine using the lost machines IP address.

<> The code is another option to minimize server outages as it gives you the liberty to change the Memcached server list with minimal work.

<> Setting timeout value is another option that some Memcached clients implement for Memcached server outage. When your Memcached server goes down, the client will keep trying to send a request till the time-out limit is reached.

You are having multiple Memcache servers, in which one of the memcache servers fails, and it has your data, will it ever try to get key data from that one failed server?

The data in the failed server won’t get removed, but there is a provision for auto-failure, which you can configure for multiple nodes. Fail-over can be triggered during any socket or Memcached server level errors and not during standard client errors like adding an existing key, etc.

Can you tell me some advantages of Forking Workflow over other Git workflows?

Forking Workflow is fundamentally different from other Git workflows. Instead of using a single server-side repository to act as the ‘central’ codebase, Forking Workflow gives every developer their own server-side repositories. This workflow is most often seen in public open-source projects.

The main advantage is that contributions can be integrated without the need for everyone to push to a single central repository to maintain clean project history. Developers can push to their own server-side repositories, and only the project maintainer will push to the official repository.

As soon as developers are ready to publish their local commits, they will push their commits to their own public repositories. Then, they will perform a pull request from the main repository, which notifies the project maintainer that an update is ready to be integrated.

How do you handle the merge conflicts in Git?

In order to resolve the merge conflicts in Git, we need to follow three steps:

1. Understand what happened: It could be because of the same line edit on the same file; it could be because of deleting some files, or also it could be because of files with the same file names. You can check everything by using ‘git status’.
2. Mark and clean up the conflict: When we open the files using mergetool, Git marks the conflicted area like this ‘<<<<< HEAD’ and ‘ >>>>> [other/branch/name]’.
3. Perform commit again and then merge the current branch with the master branch.

How do you squash last N commits into a single commit?

There are two options to squash last N commits into a single commit. Include both of the below mentioned options in your answer:

<> 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})”

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 one major advantage it has over other VCS tools like SVN is that it is a distributed version control system.”
Distributed VCS tools do not necessarily rely on a central server to store all the versions of a project’s files. Instead, every developer “clones” a copy of a repository and has the full history of the project on their own hard drive.

How is IaC implemented using AWS?

Start by talking about the age-old mechanisms of writing commands onto script files and testing them in a separate environment before deployment and how this approach is being replaced by IaC. Similar to the codes written for other services, with the help of AWS, IaC allows developers to write, test, and maintain infrastructure entities in a descriptive manner, using formats such as JSON or YAML. This enables easier development and faster deployment of infrastructure changes.

Name three important DevOps KPIs.

The three important KPIs are as follows:

<> Meantime to failure recovery - This is the average time taken to recover from a failure.

<> Deployment frequency - The frequency in which the deployment occurs.

<> Percentage of failed deployments - The number of times the deployment fails.

What are the benefits of using version control?

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

1. With Version Control System (VCS), all the team members are allowed to work freely on any file at any time. VCS will later allow you to merge all the changes into a common version.
2. All the past versions and variants are neatly packed up inside the VCS. When you need it, you can request any version at any time and you’ll have a snapshot of the complete project right at hand.
3. Every time you save a new version of your project, your VCS requires you to provide a short description of what was changed. Additionally, you can see what exactly was changed in the file’s content. This allows you to know who has made what change in the project.
4. A distributed VCS like Git allows all the team members to have complete history of the project so if there is a breakdown in the central server you can use any of your teammate’s local Git repository.

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.

What are the anti-patterns of DevOps?

A pattern is common usage usually followed. If a pattern commonly adopted by others does not work for your organization and you continue to blindly follow it, you are essentially adopting an anti-pattern. There are myths about DevOps. Some of them include:

* DevOps is a process
* Agile equals DevOps?
* We need a separate DevOps group
* Devops will solve all our problems
* DevOps means Developers Managing Production
* DevOps is Development-driven release management

<> DevOps is not development driven.
<> DevOps is not IT Operations driven.

* We can’t do DevOps – We’re Unique
* We can’t do DevOps – We’ve got the wrong people

How will you approach a project that needs to implement DevOps?

The following standard approaches can be used to implement DevOps in a specific project:

Stage 1

An assessment of the existing process and implementation for about two to three weeks to identify areas of improvement so that the team can create a road map for the implementation.

Stage 2

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

Stage 3

The project is now ready for implementing DevOps by using version control/integration/testing/deployment/delivery and monitoring followed step by step.

By following the proper steps for version control, integration, testing, deployment, delivery, and monitoring, the project is now ready for DevOps implementation.

Can you say something about the DevOps pipeline?

A pipeline, in general, is a set of automated tasks/processes defined and followed by the software engineering team. DevOps pipeline is a pipeline which allows the DevOps engineers and the software developers to efficiently and reliably compile, build and deploy the software code to the production environments in a hassle free manner.

What is Resilience Testing?

Resilience Testing is a software process that tests the application for its behavior under uncontrolled and chaotic scenarios. It also ensures that the data and functionality are not lost after encountering a failure.

What is CBD in DevOps?

CBD stands for Component-Based Development. It is a unique way for approaching product development. Here, developers keep looking for existing well-defined, tested, and verified components of code and relieve the developer of developing from scratch.

Mention some of the core benefits of DevOps.

The core benefits of DevOps are as follows:

Technical benefits

<> Continuous software delivery
<> Less complex problems to manage
<> Early detection and faster correction of defects

Business benefits

<> Faster delivery of features
<> Stable operating environments
<> Improved communication and collaboration between the teams

Explain your understanding and expertise on both the software development side and the technical operations side of an organization you have worked with in the past.

For this answer, share your past experience and try to explain how flexible you were in your previous job. You can refer the below example:
DevOps engineers almost always work in a 24/7 business-critical online environment. I was adaptable to on-call duties and was available to take up real-time, live-system responsibility. I successfully automated processes to support continuous software deployments. I have experience with public/private clouds, tools like Chef or Puppet, scripting and automation with tools like Python and PHP, and a background in Agile.

What are the various branching strategies used in the version control system?

Branching is a very important concept in version control systems like git which facilitates team collaboration. Some of the most commonly used branching types are:

Feature branching

<> This branching type ensures that a particular feature of a project is maintained in a branch.
<> Once the feature is fully validated, the branch is then merged into the main branch.

Task branching

<> Here, each task is maintained in its own branch with the task key being the branch name.
<> Naming the branch name as a task name makes it easy to identify what task is getting covered in what branch.

Release branching

<> This type of branching is done once a set of features meant for a release are completed, they can be cloned into a branch called the release branch. Any further features will not be added to this branch.
<> Only bug fixes, documentation, and release-related activities are done in a release branch.
<> Once the things are ready, the releases get merged into the main branch and are tagged with the release version number.
<> These changes also need to be pushed into the develop branch which would have progressed with new feature development.
<> The branching strategies followed would vary from company to company based on their requirements and strategies

Search
R4R Team
R4R provides DevOps Freshers questions and answers (DevOps Interview Questions and Answers) .The questions on R4R.in website is done by expert team! Mock Tests and Practice Papers for prepare yourself.. Mock Tests, Practice Papers,DevOps interview questions for experienced,DevOps Freshers & Experienced Interview Questions and Answers,DevOps Objetive choice questions and answers,DevOps Multiple choice questions and answers,DevOps objective, DevOps questions , DevOps answers,DevOps MCQs questions and answers Java, C ,C++, ASP, ASP.net C# ,Struts ,Questions & Answer, Struts2, Ajax, Hibernate, Swing ,JSP , Servlet, J2EE ,Core Java ,Stping, VC++, HTML, DHTML, JAVASCRIPT, VB ,CSS, interview ,questions, and answers, for,experienced, and fresher R4r provides Python,General knowledge(GK),Computer,PHP,SQL,Java,JSP,Android,CSS,Hibernate,Servlets,Spring etc Interview tips for Freshers and Experienced for DevOps fresher interview questions ,DevOps Experienced interview questions,DevOps fresher interview questions and answers ,DevOps Experienced interview questions and answers,tricky DevOps queries for interview pdf,complex DevOps for practice with answers,DevOps for practice with answers You can search job and get offer latters by studing r4r.in .learn in easy ways .