Devops Engineer

filter-iconFilter interviews by

90+ Devops Engineer Interview Questions and Answers for Freshers

Updated 28 Jan 2025

Popular Companies

search-icon

Q1. How Can You Ensure High Availability of the etcd Cluster Used by Kubernetes?

Ans.

To ensure high availability of the etcd cluster used by Kubernetes, you can implement redundancy, monitoring, and disaster recovery strategies.

  • Implement a multi-node etcd cluster to ensure redundancy and fault tolerance.

  • Utilize monitoring tools like Prometheus and Grafana to track the health and performance of the etcd cluster.

  • Set up regular backups and implement disaster recovery plans to quickly recover from failures.

  • Use Kubernetes features like PodDisruptionBudgets to prev...read more

Q2. How Would You Approach Capacity Planning for a Kubernetes Cluster?

Ans.

Capacity planning for a Kubernetes cluster involves analyzing resource usage, predicting future needs, and scaling infrastructure accordingly.

  • Monitor resource usage of pods and nodes using tools like Prometheus and Grafana

  • Analyze historical data to identify trends and patterns in resource consumption

  • Estimate future resource requirements based on application growth and workload changes

  • Scale the cluster by adding or removing nodes, adjusting resource limits, or using auto-scali...read more

Q3. How Would You Implement Zero-Downtime Deployments in Kubernetes?

Ans.

Implementing zero-downtime deployments in Kubernetes involves using rolling updates and readiness probes.

  • Use rolling updates to gradually replace old pods with new ones

  • Configure readiness probes to ensure new pods are ready before routing traffic to them

  • Utilize tools like Helm for managing releases and versioning

Q4. What is Jenkins and how to setup multiple pipeline?

Ans.

Jenkins is a popular open-source automation server used for continuous integration and continuous delivery (CI/CD).

  • Install Jenkins on a server or machine

  • Create a new pipeline job in Jenkins

  • Configure the pipeline job with the necessary settings and parameters

  • Add stages and steps to the pipeline script

  • Repeat the process to set up multiple pipelines

Are these interview questions helpful?

Q5. How do you approach to create a jenkins pipeline ?

Ans.

To create a Jenkins pipeline, I follow these steps:

  • Define the stages and steps of the pipeline

  • Create a Jenkinsfile with the pipeline code

  • Configure Jenkins to use the Jenkinsfile

  • Test the pipeline and make necessary adjustments

  • Integrate with version control for continuous integration

  • Use plugins for additional functionality

Q6. Explain the Role and Functionality of the Control Plane Components in Kubernetes.

Ans.

Control plane components in Kubernetes manage the cluster and make decisions about the state of the cluster.

  • Control Manager: Ensures that the desired state of the cluster matches the actual state.

  • Scheduler: Assigns workloads to nodes based on resource availability and constraints.

  • API Server: Acts as the front-end for the Kubernetes control plane and is the primary interface for users and other components.

  • etcd: Consistent and highly-available key-value store used as Kubernetes...read more

Share interview questions and help millions of jobseekers 🌟

man-with-laptop

Q7. What is current ctc & expected ctc?

Ans.

I prefer to discuss compensation after understanding the role and responsibilities.

  • I am open to negotiation based on the job requirements

  • I am looking for a fair and competitive salary

  • I am more interested in the opportunity and growth potential than just the salary

  • I am willing to consider other benefits such as health insurance, retirement plans, etc.

Q8. How would you handle auto-scaling and load balancing in a cloud-based infrastructure?

Ans.

Auto-scaling and load balancing in a cloud-based infrastructure involves dynamically adjusting resources based on demand and distributing traffic efficiently.

  • Implement auto-scaling policies to automatically add or remove instances based on metrics like CPU utilization or network traffic.

  • Utilize load balancers to evenly distribute incoming traffic across multiple instances to prevent overload.

  • Use cloud provider tools like AWS Auto Scaling and Elastic Load Balancing to easily m...read more

Devops Engineer Jobs

System Integration / DevOps Engineer 2-6 years
Siemens Healthcare
4.3
Bangalore / Bengaluru
DevOps Engineer 8-12 years
Intel Technology India Pvt Ltd
4.2
Bangalore / Bengaluru
DevOps Engineer 2-8 years
Ericsson India Global Services Pvt. Ltd.
4.1
Noida

Q9. introduction why you choose devops any programming language you have learned

Ans.

I chose DevOps because it allows me to bridge the gap between development and operations, and I have learned multiple programming languages.

  • DevOps enables faster and more efficient software delivery

  • I have experience with programming languages such as Python, Java, and Bash

  • DevOps practices such as continuous integration and deployment are essential for modern software development

  • I enjoy working in a collaborative environment where I can use my technical skills to solve complex...read more

Q10. Why we have shifted to DevOps from the agile world?

Ans.

DevOps complements Agile by bridging the gap between development and operations teams.

  • Agile focuses on iterative development and delivery of software

  • DevOps emphasizes collaboration and communication between development and operations teams

  • DevOps automates the software delivery process to increase efficiency and reduce errors

  • DevOps enables faster and more frequent releases of software

  • DevOps helps organizations to deliver high-quality software with greater speed and agility

Q11. Difference between CMD and RUN in Dockerfile ?

Ans.

CMD is used to specify the default command to be executed when a container is launched. RUN is used to execute commands during the build process.

  • CMD is used to set the default command or parameters for the container

  • RUN is used to execute commands during the build process to create the image

  • CMD can be overridden by passing arguments to docker run command

  • RUN executes the command and creates a new layer on top of the current image

  • Example: CMD ["python", "app.py"]

  • Example: RUN apt...read more

Q12. What is the use of Jenkins pipeline

Ans.

Jenkins pipeline is a way to define and automate the steps in your software delivery process.

  • Allows you to define your build process as code

  • Enables you to automate the entire software delivery process

  • Supports both declarative and scripted syntax

  • Provides visibility into the status of each stage of the pipeline

  • Integrates with version control systems like Git

Q13. Write advance terraform script write a azure devops pipeline script write a python script for Fibonacci serious

Ans.

Answering the interview question by providing advanced terraform, Azure DevOps pipeline, and Python scripts for Fibonacci series.

  • Use Terraform to provision Azure resources like VMs, storage accounts, and networking components.

  • Create an Azure DevOps pipeline script to automate the deployment process using Terraform.

  • Write a Python script to generate Fibonacci series using recursion or iteration.

  • Ensure proper error handling and input validation in the Python script.

  • Integrate the...read more

Q14. Can you explain the concept of DevOps and its benefits?

Ans.

DevOps is a software development methodology that combines development and operations teams to improve collaboration, efficiency, and quality.

  • DevOps focuses on automating and streamlining the software development process.

  • It emphasizes continuous integration, continuous delivery, and continuous deployment.

  • Benefits of DevOps include faster time to market, improved quality, increased collaboration, and better scalability.

  • Example: Using tools like Jenkins for automated testing an...read more

Q15. Linux basic commands for troubleshooting ?

Ans.

Some basic Linux commands for troubleshooting include ls, ps, top, grep, and netstat.

  • ls - list directory contents

  • ps - report a snapshot of the current processes

  • top - display Linux processes

  • grep - search for specific patterns in files

  • netstat - display network connections, routing tables, interface statistics, masquerade connections, and multicast memberships

Q16. What is git, git push, git pull, git revert, git merge etc.

Ans.

Git is a version control system used for tracking changes in source code during software development.

  • git push: Command used to upload local repository content to a remote repository.

  • git pull: Command used to fetch and download content from a remote repository to a local repository.

  • git revert: Command used to undo changes by creating a new commit that reverts the changes specified.

  • git merge: Command used to combine changes from one branch into another branch.

  • git checkout: Comm...read more

Q17. Difference between the docker and kubernetes

Ans.

Docker is a containerization platform for packaging applications, while Kubernetes is a container orchestration tool for managing containerized applications.

  • Docker is used to create, deploy, and run applications in containers.

  • Kubernetes automates the deployment, scaling, and management of containerized applications.

  • Docker focuses on packaging applications and their dependencies into containers.

  • Kubernetes focuses on orchestrating multiple containers to work together as a singl...read more

Q18. Creation of Docker image using Dockerfile ?

Ans.

Dockerfile is a script that contains instructions to build a Docker image.

  • Create a Dockerfile with instructions for building the image

  • Use the 'docker build' command to build the image from the Dockerfile

  • Example: FROM ubuntu:latest RUN apt-get update && apt-get install -y nginx

  • Example: docker build -t myimage:latest .

Q19. WAP to implement mean using single linked list.

Ans.

Implement mean using single linked list in a WAP.

  • Create a linked list to store the elements.

  • Traverse the linked list to calculate the sum of all elements.

  • Divide the sum by the number of elements to get the mean.

Q20. How do you give admin permissions to run your playbook

Ans.

To give admin permissions to run a playbook, you can use sudo or grant specific permissions in the sudoers file.

  • Grant sudo access to the user running the playbook

  • Add the user to the sudoers file with specific permissions

  • Use ansible_become to run tasks with elevated privileges

Q21. What is the use s3 bucket

Ans.

S3 bucket is a storage service provided by AWS for storing and retrieving data.

  • Used for storing files, images, videos, backups, and other data

  • Can be accessed from anywhere on the internet

  • Provides scalability, durability, and security for data storage

  • Can be used for hosting static websites

Q22. Which version we use in git

Ans.

The version used in git is typically the latest stable release.

  • The version used in git can vary depending on the organization's preferences and requirements.

  • It is recommended to use the latest stable release to ensure compatibility and access to new features.

  • Some organizations may choose to use specific versions for stability or compatibility reasons.

  • Commonly used versions include Git 2.30.2, Git 2.31.1, etc.

Q23. Use cases of AWS in code deployment

Ans.

AWS is used in code deployment for scalability, automation, and reliability.

  • Automated deployment pipelines using AWS CodePipeline

  • Scalable infrastructure with AWS Elastic Beanstalk

  • Reliable deployment with AWS CodeDeploy

  • Blue-green deployments with AWS CodeDeploy

  • Continuous integration with AWS CodeBuild

Q24. What is build in Java ?

Ans.

Build in Java refers to the process of compiling source code into executable code.

  • Build process involves compiling, testing, and packaging the code

  • Java build tools like Maven and Gradle automate the build process

  • Build artifacts can be JAR, WAR, or EAR files

  • Build process can be customized using build scripts like Ant

Q25. What is PaaS, IaaS & SaaS ?

Ans.

PaaS, IaaS, and SaaS are cloud computing models that provide different levels of infrastructure and software services.

  • PaaS (Platform as a Service) provides a platform for developers to build and deploy applications without worrying about infrastructure management.

  • IaaS (Infrastructure as a Service) provides virtualized computing resources such as servers, storage, and networking.

  • SaaS (Software as a Service) provides software applications that are hosted and managed by a third-...read more

Q26. Difference between the rebase and fetch

Ans.

Rebase rewrites commit history by moving the current branch to the updated base branch, while fetch retrieves changes from a remote repository.

  • Rebase is used to apply changes from one branch to another by rewriting commit history.

  • Fetch is used to retrieve changes from a remote repository without merging them into the local branch.

  • Rebase can be used to keep commit history clean and linear, while fetch allows for reviewing changes before merging.

  • Example: git rebase master (move...read more

Q27. Syntax to print jenkins secrets ?

Ans.

To print Jenkins secrets, use the syntax: printenv

  • Use the 'printenv' command followed by the name of the secret to print its value

  • Make sure to have the necessary permissions to access the secret

  • Example: printenv MY_SECRET

Q28. How can you add a plugin in Jenkins manually

Ans.

To add a plugin in Jenkins manually, you can download the plugin file and upload it through the Jenkins web interface.

  • Download the desired plugin file from the Jenkins website or other sources.

  • Navigate to the Jenkins dashboard and click on 'Manage Jenkins'.

  • Select 'Manage Plugins' and go to the 'Advanced' tab.

  • Choose the 'Upload Plugin' option and select the downloaded plugin file.

  • Click 'Upload' and restart Jenkins to apply the changes.

Q29. What devops tools your worked on

Ans.

I have worked with various DevOps tools including Jenkins, Git, Docker, Kubernetes, Ansible, and AWS.

  • Experience with Jenkins for continuous integration and deployment

  • Proficient in Git for version control

  • Familiarity with Docker and Kubernetes for containerization and orchestration

  • Knowledge of Ansible for configuration management

  • Experience with AWS for cloud infrastructure management

Q30. Different Linux command used in daily life of devops Engineer

Ans.

Various Linux commands are essential for a DevOps Engineer's daily tasks.

  • ls - list directory contents

  • cd - change directory

  • pwd - print working directory

  • grep - search for patterns in files

  • chmod - change file permissions

  • tar - archive files

  • ssh - secure shell for remote access

  • ps - display information about running processes

  • top - display and update sorted information about processes

  • find - search for files in a directory hierarchy

Q31. Explain Aws lamda AWS vpc routing and some commands

Ans.

AWS Lambda is a serverless computing service that runs code in response to events and automatically manages the computing resources.

  • AWS Lambda functions can be associated with a VPC to access resources within the VPC.

  • VPC routing allows Lambda functions to communicate with resources in the VPC.

  • Some commands related to AWS Lambda and VPC routing include: aws lambda create-function, aws lambda update-function-configuration, aws ec2 create-route, aws ec2 create-route-table

Q32. Write a groovy script declarative and scripted pipelines

Ans.

A groovy script for declarative and scripted pipelines

  • Use 'pipeline' block for declarative pipeline

  • Use 'node' block for scripted pipeline

  • Declarative example: pipeline { agent any stages { stage('Build') { steps { echo 'Building...' } } } }

  • Scripted example: node { stage('Test') { echo 'Testing...' } }

Q33. Explain about Git, Ansible, Terraform, Kubernetes?

Ans.

Git is a version control system, Ansible is a configuration management tool, Terraform is an infrastructure as code tool, and Kubernetes is a container orchestration platform.

  • Git is used for tracking changes in code, collaborating with team members, and managing different versions of code.

  • Ansible automates software provisioning, configuration management, and application deployment.

  • Terraform allows infrastructure to be defined as code, making it easier to manage and provision ...read more

Q34. How abstraction can be done in java

Ans.

Abstraction in Java is achieved by using abstract classes and interfaces to define common behavior without implementing it.

  • Use abstract classes to define common methods without implementation

  • Use interfaces to define method signatures without implementation

  • Abstraction helps in achieving loose coupling and code reusability

Q35. how ssl certificate install on iis server

Ans.

SSL certificate can be installed on IIS server by importing the certificate through the server's management console.

  • Access IIS Manager on the server

  • Select the server node in the connections pane

  • Double-click on Server Certificates in the features view

  • Click on Import in the Actions pane and follow the wizard to import the SSL certificate

Q36. Reverse the string and write algorithm

Ans.

Algorithm to reverse a string

  • Create an empty string to store the reversed string

  • Loop through the original string from the end to the beginning

  • Add each character to the new string

  • Return the new string

Q37. Project implementation using docker

Ans.

Project implementation using Docker involves creating containers to package and run applications with their dependencies.

  • Define the project requirements and identify the components that need to be containerized

  • Write a Dockerfile to specify the environment and dependencies for each component

  • Build Docker images using the Dockerfile

  • Run containers based on the built images and configure networking and storage as needed

  • Orchestrate multiple containers using Docker Compose or Kubern...read more

Q38. what is Primary and Foreign key?

Ans.

Primary key uniquely identifies a record in a table, while foreign key refers to a field in another table.

  • Primary key is a unique identifier for a record in a table

  • Foreign key is a field in another table that refers to the primary key of the first table

  • Primary key cannot be null, while foreign key can be null

  • Primary key can be used to create relationships between tables

Q39. How pods communicates with each others.

Ans.

Pods communicate with each other through network communication within the same Kubernetes cluster.

  • Pods can communicate using localhost or loopback address.

  • Pods can communicate using services which act as stable endpoints for pods.

  • Pods can communicate using environment variables to pass information.

  • Pods can communicate using shared volumes to exchange data.

  • Pods can communicate using Kubernetes networking model like DNS for service discovery.

Q40. Why not to use server less in AWS?

Ans.

Serverless may not be suitable for applications requiring long-running tasks, high performance, or specific infrastructure requirements.

  • Serverless may not be cost-effective for applications with consistent high traffic or long-running tasks.

  • Serverless may have limitations in terms of performance compared to traditional server-based architectures.

  • Serverless may not provide as much control over the underlying infrastructure compared to managing your own servers.

  • Serverless may n...read more

Q41. Difference between Java and Nodejs ?

Ans.

Java is a statically typed language while Nodejs is a runtime environment for executing JavaScript code.

  • Java is compiled while Nodejs is interpreted

  • Java is better for large-scale enterprise applications while Nodejs is better for real-time applications

  • Java has a larger community and more libraries while Nodejs has a simpler and more lightweight architecture

  • Java is used for Android app development while Nodejs is used for server-side web development

Q42. AWS concepts services used architecture for Kubernetes

Ans.

AWS provides various services that can be used to build a scalable and reliable architecture for Kubernetes.

  • AWS Elastic Kubernetes Service (EKS) is a managed Kubernetes service that simplifies the deployment, management, and scaling of Kubernetes clusters.

  • AWS CloudFormation can be used to automate the provisioning of infrastructure resources for Kubernetes clusters.

  • AWS Identity and Access Management (IAM) can be used to manage access control and permissions for Kubernetes res...read more

Q43. Difference between List and Tuple and Dictionary?

Ans.

List is mutable, Tuple is immutable, Dictionary is key-value pair

  • List is denoted by square brackets [], Tuple by parentheses (), and Dictionary by curly braces {}

  • List can be modified, Tuple cannot be modified, Dictionary can be modified by adding or deleting key-value pairs

  • List and Tuple can store multiple values of different data types, Dictionary stores data in key-value pairs

  • List and Tuple maintain the order of elements, Dictionary does not maintain the order of elements

  • Ex...read more

Q44. Working of Terraform , Packer ,Puppet

Ans.

Terraform, Packer, and Puppet are tools used in DevOps for infrastructure automation and configuration management.

  • Terraform is used for infrastructure as code and automates the provisioning of infrastructure resources.

  • Packer is used for creating machine images for multiple platforms from a single source configuration.

  • Puppet is used for configuration management and automates the deployment and management of software and configurations across multiple servers.

Q45. What is artifact

Ans.

An artifact is a deployable component of a software application that is generated during the build process.

  • Artifacts can include compiled code, libraries, configuration files, and other resources needed for the application to run.

  • They are typically stored in a repository and can be deployed to various environments.

  • Examples of artifacts include JAR files, WAR files, Docker images, and RPM packages.

Q46. What is Jenkins file

Ans.

Jenkins file is a text file that contains the definition of a Jenkins Pipeline.

  • Jenkins file is written in Groovy DSL (Domain Specific Language).

  • It defines the steps, stages, and other configurations of a Jenkins Pipeline.

  • Jenkins file can be stored in source control along with the code it builds.

  • It allows for versioning and sharing of pipeline configurations.

Q47. Explain ci/cd process?

Ans.

CI/CD is a process of continuous integration and continuous delivery/deployment.

  • CI/CD is a software development approach that involves continuous integration, testing, and delivery/deployment.

  • It helps to automate the software delivery process and ensures that the code is always in a deployable state.

  • CI/CD pipeline includes stages like build, test, deploy, and release.

  • Tools like Jenkins, GitLab, and Travis CI are used to implement CI/CD.

  • CI/CD helps to reduce the time to market...read more

Q48. what is devOps and different tools

Ans.

DevOps is a software development methodology that combines software development (Dev) with IT operations (Ops) to shorten the systems development life cycle.

  • DevOps focuses on collaboration, automation, and monitoring throughout the software development lifecycle.

  • Common DevOps tools include Jenkins, Docker, Ansible, Kubernetes, Git, and Puppet.

  • These tools help automate the software development process, manage infrastructure, and deploy applications efficiently.

Q49. Docker cmd and enterypoint different

Ans.

Docker CMD and ENTRYPOINT are different ways to specify the command that will run when a container is started.

  • CMD is used to provide default arguments for the ENTRYPOINT command

  • ENTRYPOINT is used to specify the executable that will run when the container starts

  • CMD can be overridden at runtime by providing arguments to the docker run command

  • ENTRYPOINT cannot be overridden at runtime

Q50. How to ensure security for rds data

Ans.

Secure RDS data by implementing encryption, access control, monitoring, and regular security audits.

  • Enable encryption at rest and in transit for RDS instances.

  • Implement strong access control measures such as IAM roles, security groups, and VPC settings.

  • Enable database auditing and monitoring to detect any unauthorized access or suspicious activities.

  • Regularly conduct security audits and vulnerability assessments to identify and address any security gaps.

  • Use tools like AWS Key...read more

1
2
Next
Interview Tips & Stories
Ace your next interview with expert advice and inspiring stories

Interview experiences of popular companies

3.7
 • 10.4k Interviews
3.8
 • 8.1k Interviews
3.6
 • 7.5k Interviews
3.7
 • 5.6k Interviews
3.7
 • 5.6k Interviews
3.7
 • 4.8k Interviews
3.5
 • 3.8k Interviews
3.8
 • 2.9k Interviews
4.0
 • 2.3k Interviews
3.8
 • 510 Interviews
View all

Calculate your in-hand salary

Confused about how your in-hand salary is calculated? Enter your annual salary (CTC) and get your in-hand salary

Recently Viewed
INTERVIEWS
Agrostar
No Interviews
INTERVIEWS
Agrostar
No Interviews
INTERVIEWS
Agrostar
No Interviews
INTERVIEWS
Agrostar
No Interviews
INTERVIEWS
Agrostar
No Interviews
INTERVIEWS
Agrostar
No Interviews
INTERVIEWS
Agrostar
No Interviews
INTERVIEWS
Agrostar
No Interviews
INTERVIEWS
Agrostar
No Interviews
INTERVIEWS
Agrostar
No Interviews
Devops Engineer Interview Questions
Share an Interview
Stay ahead in your career. Get AmbitionBox app
qr-code
Helping over 1 Crore job seekers every month in choosing their right fit company
65 L+

Reviews

4 L+

Interviews

4 Cr+

Salaries

1 Cr+

Users/Month

Contribute to help millions

Made with ❤️ in India. Trademarks belong to their respective owners. All rights reserved © 2024 Info Edge (India) Ltd.

Follow us
  • Youtube
  • Instagram
  • LinkedIn
  • Facebook
  • Twitter