DevOps Interview Questions

Share on facebook
Facebook
Share on twitter
Twitter
Share on linkedin
LinkedIn

Never miss a post!

Sign up for our newsletter and get FREE Development Trends delivered directly to your inbox.

You can unsubscribe any time. Terms & Conditions.
Categories

You preparing for DevOps interviews and looking for frequently asked DevOps interview questions? Well, you have landed at the right place. It can be overwhelming to find many DevOps interview questions online but going through all of them can be very time-consuming. In this blog, I will talk about the popular 15 DevOps interview questions that you must know in order to crack your DevOps interviews with ease. We will be looking at the interview questions which a typical DevOps engineer faces in an interview. This is both for people who are new to the DevOps world and people who are experienced in other fields like Linux or production support and are willing or wanting to move to DevOps. So, let’s get started!

Q1. What is DevOps?

I would say that DevOps is actually a practice that brings developers and operations teams together in a collaborative fashion using proper processes, techniques, and tools to achieve the fastest and reliable software releases.

Q2: Why do we need DevOps?

  • Increase deployment frequency
  • Quicker mitigation of software defects
  • Better resource management
  • Automating the processes
  • Reduced human errors
  • Enhanced version control
  • Stable operating environment
  • Lower failure rate of new releases

Q3. Name some of the DevOps tools and how these tools work together?

We start with a source control tool, and git is a distributed version control management tool to use. And then maven for building and compiling your code. And then store the artifacts in an artifact management repository solution, nexus repository, for example. All these things have to be integrated with a continuous integration tool called Jenkins. Jenkins can be integrated with the testing tool selenium, which is an example of web interface testing and functional testing. The next thing is to deploy the application in a particular environment, so you need to have a provisioning system. For that purpose, you can use puppet, chef, ansible. Also, you can use docker for microservice applications.

Q4. What do you understand by infrastructure as code?

The infrastructure as code has been very popular, the DevOps evolved from the principles of configuration management, and the infrastructure is code. It means that the provisioning of an environment should start with a code. So, if you wanted to provision a dev or a test or production environment, everything should be starting with code. It should contain a code and you trigger the code that will actually pick your program and deploy the environment. The definition says IaC is the automation of IT operations such as build, deploy, manage by provisioning of code, rather than the manual process.

Q5. What is SSH port forwarding?

It is a way to actually forward your ports through SSH protocols. It allows you to bypass firewalls and also tunnel ports through strictly guarded environments. This is one of the ways which you can connect to instances or services in your private subnets in AWS or your data center.

Q6. What is a zombie process?

This is one of the most common Linux-based DevOps question asked in an interview. The zombie process is a process that is in a terminated state, but which has not yet released the resources. So basically, it is most commonly a child process where the parent has exited, but the child is still there, and its entry is in the process table.

Q7. What is a blue-green deployment?

A blue-green deployment is something in which you have X number of resources running your application and say that number is 10, so you have 10 servers in a web farm now in a blue-green deployment, and what you do is take out half of those from the actual production state, you deploy the new code on those. In the meantime, the other five or the other half would be serving the production traffic and these fine would not be hindered or hampered in any way. Now the first 5 in which you complete the deployment, which you have taken out of the actual production load, you put those back in and wait for those to come back into service, and then you take the other 5 out of the actual load start deploying on those. So, in a blue-green deployment, what happens is you never let the end user see the downtime, it is an always up environment.

Q8. What is your rollback strategy?

This is something you need to be very confident about because every deployment should have a roll back associated with it. So, let’s say your deployment fails, how do you roll back the system. It has to be linked to a blue-green or a hot deployment. So, you have to say that you have a Jenkins job or a script which basically does a blue-green deployment, and in the middle of that blue-green deployment, it checks to see whether or not services are up and running and, at the least, the SGTP endpoints of your application are running or not.

Q9. Have you used Jenkins for deployment?

Yes, I have used Jenkins for deployment using a couple of strategies. I have used it with plugins and also with my script. So, my plugins used to deploy code on the environment using build or publish or SSH. And I have also had my ansible or chef or puppet code which used to do the deployment for me. I have used Jenkins as an orchestrator and puppet/chef/ansible for the actual deployment of the target service.

Q10. What Jenkins plugins have you used?

I have used multiple Jenkins plugins. For example, I have used Maven and Gradle for builds, Cleopatra for testing, PMD for programmatic mistake detection, Saltstack for Ruby on Rails testing, Karma for AngularJS testing and integration with s3. I have also used the git plugin for checking out code, SVN plugin for checking out SVN repositories, upstream/downstream plugin for connecting the builds. In addition to this, I have used the archive artifacts plugin, publish HTML reports plugin to publish test reports.

Q11. How will you secure Jenkins?

  • Ensure global security is on
  • Ensure that Jenkins is integrated with the company’s user directory with the appropriate plugin
  • Ensure that project matrix is enabled to fine tune access
  • Automate the process of setting rights and privileges in Jenkins with custom version controlled script
  • Limit physical access to Jenkins folder
  • Periodically run security audits on Jenkins

Q12. Which configuration management tool have you used?

I have used all three popular configuration management tools – chef, ansible and puppet in one project or another. I have good hands-on experience with each of them. I have written chef cookbooks, puppet modules and ansible playbooks.

Q13. What are modules and manifests in Puppet?

A Puppet module is a collection of manifest and data, such as facts, files, templates and they have a specific directory structure. Modules are useful for organizing your puppet code because they allow you two split your code into multiple manifests. Modules are self-contained bundles of code and data.

Every slave has got its configuration details in puppet master, written in the native puppet language. These details are written in the language which puppet can understand and are termed as manifests. They are composed of puppet code, and their file names use the .pp extension, they are basically puppet programs.

Q14. What is the difference between push and pull in configuration management?

Your centralized server actually stores the configuration information of all your nodes. Now, if there is a change that a node needs to receive, then the mechanisms that would be involved are either a centralized server can push the change to the required node, that is a push mechanism, or the nodes can define a polling mechanism so that the node will consistently check with the centralized server and then updates it whenever there is a need. And that is pull mechanism. Some configuration management tools use push-based mechanisms, and some tools work on pull-based configuration management. For example, Ansible uses the push method and other tools like Puppet, Chef and Saltstack use pull-based mechanism.

Q15. What is the biggest issue you have faced in a production environment?

There was an application we used to run on the cloud, and there was some application deployment error. It was a logical error in the application which caused an error behind the elastic load balancer. So, we had an elastic load balancer tied to the auto-scaling group, it kind of snowballed the application, and we could not control it. The application scaled infinitely, and it was snowballing the instances, so we had to go in and manually freeze the size of the auto-scaling group. Once the size was frozen, we were able to go into the instances, check the logs, fix the issue, rebuild the AMI and restart the auto-scaling process. So, that was one of the biggest issues in production I faced recently.

Final Thoughts

DevOps is a vast topic, and there is plenty to learn. Do not just mug up these answers, understand the technicalities of these answers also. You can find thousands of DevOps interview questions online, but these are the top 15 DevOps interview questions which you must know, and these are the questions that will give you a kickstart to your future DevOps interviews. So, prepare well and all the best!

Share on facebook
Facebook
Share on twitter
Twitter
Share on linkedin
LinkedIn

Our website uses cookies that help it to function, allow us to analyze how you interact with it, and help us to improve its performance. By using our website you agree by our Terms and Conditions and Privacy Policy.