Devops Engineer
900+ Devops Engineer Interview Questions and Answers
Popular Companies
Q101. What errors you have faced while applying terraform code?
I have faced errors such as resource conflicts, syntax errors, and provider version mismatches while applying Terraform code.
Resource conflicts occur when multiple resources are trying to create the same resource at the same time.
Syntax errors can occur due to incorrect syntax in the Terraform code, such as missing brackets or incorrect attribute names.
Provider version mismatches can occur when the Terraform code is written for a specific provider version but a different vers...read more
Q102. tell about deployment strategies and create one demo solution architect diagram with all securities and with CICD and aws cloud
Deployment strategies ensure efficient software delivery while maintaining system stability and security.
Blue-Green Deployment: Two identical environments (blue and green) to reduce downtime during updates.
Canary Releases: Gradually roll out changes to a small subset of users before full deployment.
Rolling Updates: Update instances in batches to minimize impact on users.
Recreate Strategy: Stop the old version and deploy the new version, suitable for stateless applications.
A/B...read more
Q103. how can you check listen ports?
To check listen ports, use netstat command in terminal.
Open terminal/command prompt
Type 'netstat -tuln' command
This will display all the listening ports on the system
Q104. 1. SSL implementation for different hadoop services. 2. Kerberos implementation for different hadoop components. 3. Performance benchmarking of hadoop cluster. 4. Automated deployment of hadoop services through...
read moreQuestions related to implementation and performance of Hadoop cluster.
SSL implementation for Hadoop services involves generating SSL certificates and configuring SSL/TLS protocols for secure communication between Hadoop components.
Kerberos implementation for Hadoop components involves setting up a Kerberos KDC, creating principals and keytabs, and configuring Hadoop services to use Kerberos authentication.
Performance benchmarking of Hadoop cluster involves measuring various m...read more
Q105. How do your container communicate in Kubernetes?
Containers in Kubernetes communicate with each other through networking and service discovery mechanisms.
Containers within the same pod can communicate over localhost.
Containers in different pods can communicate using Kubernetes services.
Kubernetes assigns each pod a unique IP address for communication.
Kubernetes also supports DNS-based service discovery for containers.
Q106. What is feature branching and task branching?
Feature branching and task branching are strategies used in version control systems to manage development tasks.
Feature branching involves creating a separate branch for each new feature being developed, allowing for isolation and independent development.
Task branching is similar to feature branching but is used for smaller tasks or bug fixes.
Both feature branching and task branching help in organizing and managing code changes effectively.
Example: Creating a feature branch '...read more
Share interview questions and help millions of jobseekers 🌟
Q107. Kubernetes: explain your kubernetes architecture, kubectl create and apply difference, How will you give access to new user on kubernetes. Role and RoleBinding, various Kubernetes certificates
Kubernetes architecture, kubectl create vs apply, user access management, Role and RoleBinding, Kubernetes certificates
Kubernetes architecture typically consists of master nodes and worker nodes, with the master nodes managing the cluster and worker nodes running applications.
kubectl create is used to create new resources in Kubernetes, while kubectl apply is used to create or update resources based on a configuration file.
To give access to a new user on Kubernetes, you can c...read more
Q108. What's is docker multistage? Explain What is terraform state file ? What happened if 2 user apply terraform at same time ? What will be best practices? Diff btwn stateless and state full What measures will you...
read moreDocker multistage is a feature that allows you to build multiple Docker images in a single Dockerfile.
Docker multistage helps in reducing the size of the final image by using intermediate images for different stages of the build process.
It allows you to separate the build environment from the runtime environment, improving security and efficiency.
Each stage in a multistage build can be named and used to copy artifacts from one stage to another, without including unnecessary d...read more
Devops Engineer Jobs
Q109. Explain packages in lamba and how env variables work
Packages in Lambda are libraries or modules that can be used to extend the functionality of the code. Environment variables are used to store sensitive data.
Packages can be installed using pip or uploaded as a zip file
Environment variables can be set in the Lambda console or using AWS CLI
They can be accessed in the code using os.environ['variable_name']
Examples of sensitive data that can be stored in env variables are database credentials, API keys, and passwords
SQL query optimization techniques improve performance by reducing query execution time.
Use indexes to speed up data retrieval
Avoid using SELECT * and only retrieve necessary columns
Optimize joins by using appropriate join types (e.g. INNER JOIN, LEFT JOIN)
Use WHERE clause to filter data early in the query
Avoid using subqueries if possible
Q111. what is kubernetes? explain the architecture?
Kubernetes is an open-source container orchestration platform that automates deployment, scaling, and management of containerized applications.
Kubernetes is used to manage containerized applications across multiple hosts.
It provides a platform for automating deployment, scaling, and operations of application containers.
Kubernetes architecture consists of a master node and worker nodes.
The master node manages the cluster and schedules workloads to the worker nodes.
Worker nodes...read more
Q112. What is your strategy for Kubernetes cluster?
My strategy for Kubernetes cluster is to ensure high availability, scalability, and efficient resource utilization.
Implementing auto-scaling to handle sudden spikes in traffic
Using Kubernetes' built-in features like horizontal pod autoscaling and cluster autoscaling
Ensuring proper resource allocation and utilization through resource quotas and limits
Implementing rolling updates to minimize downtime
Using Kubernetes' built-in monitoring and logging tools to identify and trouble...read more
Q113. what is difference between IAAS and PAAS ?
IAAS provides virtualized computing resources over the internet, while PAAS provides a platform for developers to build, deploy, and manage applications.
IAAS offers virtualized infrastructure like virtual machines, storage, and networking, while PAAS offers a platform for developers to build, deploy, and manage applications.
IAAS allows users to manage and control the infrastructure, while PAAS abstracts the underlying infrastructure and focuses on application development.
Exam...read more
Q114. tell me filter command in Linux?
Filter command in Linux is used to filter out specific data from a file or output.
The basic syntax of the filter command is 'command | filter'.
Commonly used filter commands are grep, sed, awk, cut, sort, uniq, etc.
grep is used to search for a specific pattern in a file or output.
sed is used to perform text transformations on a file or output.
awk is used to process and manipulate text data.
cut is used to extract specific columns from a file or output.
sort is used to sort the l...read more
Q115. what is devops, phases of devops
DevOps is a software development methodology that emphasizes collaboration and communication between development and operations teams.
DevOps involves continuous integration, delivery, and deployment
Phases of DevOps include planning, coding, building, testing, releasing, deploying, operating, and monitoring
DevOps tools include Git, Jenkins, Docker, Kubernetes, and more
Q116. difference between git fetch and git pull difference between git clone and git remote
git fetch vs git pull and git clone vs git remote
git fetch downloads the changes from the remote repository but does not merge them with the local branch
git pull downloads the changes and merges them with the local branch
git clone creates a copy of the remote repository on the local machine
git remote is used to manage the remote repositories that a local repository is connected to
Kubernetes Load Balancing is a method to distribute incoming network traffic across multiple pods in a Kubernetes cluster.
Kubernetes Load Balancer service type automatically creates a cloud provider load balancer.
It helps in scaling applications by distributing traffic evenly across multiple pods.
Load balancing ensures high availability and reliability of applications running in a Kubernetes cluster.
Ruby program to check if a directory exists
Use the File.directory? method in Ruby to check if a directory exists
Provide the directory path as an argument to the method
Return true if the directory exists, false otherwise
Q119. Explain the Role and Functionality of the Control Plane Components in Kubernetes.
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
Q120. How to take backup of pipeline in azure devops
To take backup of pipeline in Azure DevOps, follow these steps:
Go to the pipeline you want to backup
Click on the three dots on the top right corner
Select 'Export'
Choose the format you want to export the pipeline in
Save the file in a secure location
Q121. How you will handle the injections and attacks?
Injections and attacks can be handled by implementing security measures and regularly updating software.
Implement security measures such as firewalls, intrusion detection systems, and access controls
Regularly update software and apply security patches
Conduct regular security audits and penetration testing
Train employees on security best practices and conduct background checks
Use encryption to protect sensitive data
Monitor network traffic for suspicious activity
Q122. Q. What is VPC Pairing? What is the process of VPC Pairing?
VPC pairing is a process of connecting two VPCs to enable communication between them.
VPC pairing allows resources in one VPC to communicate with resources in another VPC.
The process involves creating a VPC peering connection between the two VPCs.
Both VPCs must have non-overlapping IP address ranges.
VPC pairing can be used to share resources, such as databases or file systems, between VPCs.
VPC pairing can also be used to create a hub-and-spoke network topology.
VPC pairing can ...read more
Q123. What is cicd, what is git hub, what is devops , use of Azure devops, what is artifact, what is Jenkins ?
CI/CD automates software delivery; GitHub is a code repository; DevOps integrates development and operations; Azure DevOps supports CI/CD.
CI/CD stands for Continuous Integration and Continuous Deployment, streamlining software development and delivery.
GitHub is a platform for version control and collaboration, allowing multiple developers to work on projects simultaneously.
DevOps is a cultural and technical movement that emphasizes collaboration between development and operat...read more
Q124. 2. What are the different tools and technologies in devops you learnt?
I have experience with various devops tools and technologies.
Continuous Integration/Continuous Deployment (CI/CD) tools such as Jenkins, GitLab CI/CD, Travis CI
Configuration management tools such as Ansible, Chef, Puppet
Containerization tools such as Docker, Kubernetes
Infrastructure as Code (IaC) tools such as Terraform, CloudFormation
Monitoring and logging tools such as ELK Stack, Prometheus, Grafana
Version control tools such as Git
Collaboration tools such as Jira, Confluenc...read more
Q125. How you will create pipeline through script?
Creating a pipeline through script involves defining stages, tasks, and triggers in a script file.
Define stages for each step in the pipeline
Define tasks for each stage, such as building, testing, and deploying
Define triggers for each stage, such as manual or automatic triggers
Use a scripting language such as YAML or JSON to define the pipeline
Examples: Jenkinsfile for Jenkins, azure-pipelines.yml for Azure DevOps
Q126. What is the VPN port used for UDP
The VPN port used for UDP is typically 500.
The VPN port used for UDP is usually port 500.
UDP is a protocol that allows for faster transmission of data but does not guarantee delivery or order of packets.
Port 500 is commonly used for IPsec VPNs, which provide secure communication over the internet.
Other VPN protocols may use different ports for UDP, so it's important to check the specific configuration.
Q127. What are state full and stateless applications?What is the difference between them?
Stateful applications store data while stateless applications do not.
Stateful applications maintain a record of previous interactions and require persistent storage.
Stateless applications do not store data and can be easily scaled horizontally.
Stateful applications are more complex and require more resources than stateless applications.
Examples of stateful applications include databases and messaging systems, while stateless applications include web servers and load balancers...read more
Q128. How to make call from one namespace t another in AKS environment
To make a call from one namespace to another in AKS environment, use the fully qualified domain name (FQDN) of the service.
Use the FQDN of the service to make a call from one namespace to another in AKS environment
The FQDN should include the namespace and service name, for example: myservice.mynamespace.svc.cluster.local
Ensure that the service is exposed within the cluster and has a stable IP address
Use the appropriate network policies to allow traffic between namespaces if n...read more
Q129. tell the concept of oops and array with an example
Explanation of OOPs and Array with an example
OOPs is a programming paradigm that uses objects to represent real-world entities
Array is a collection of similar data types stored in contiguous memory locations
Example: A car object in OOPs can have properties like color, model, and methods like start, stop
Example: An array of integers [1, 2, 3, 4, 5] can be used to perform mathematical operations
Q130. what is ansible and what is the difference between ansible and terraform?
Ansible is a configuration management and automation tool, while Terraform is an infrastructure provisioning tool.
Ansible is used for configuration management, application deployment, and task automation.
Terraform is used for infrastructure provisioning and managing cloud resources.
Ansible uses YAML-based playbooks to define tasks and configurations, while Terraform uses HCL (HashiCorp Configuration Language) to define infrastructure as code.
Ansible is agentless, meaning it d...read more
Q131. What is Docker, and what is Kubernetes and its advantages over docker?
Docker is a containerization platform for packaging, distributing, and running applications. Kubernetes is a container orchestration tool for managing containerized applications.
Docker allows you to package an application and its dependencies into a container for easy deployment.
Kubernetes automates the deployment, scaling, and management of containerized applications.
Kubernetes provides features like auto-scaling, self-healing, and load balancing, which Docker alone does not...read more
Q132. how to create a dashboard and set up alerts in grafana Or Appdynamics?
To create a dashboard and set up alerts in Grafana or AppDynamics, you can use the following steps:
1. Log in to Grafana or AppDynamics and navigate to the dashboard section.
2. Click on 'Create Dashboard' and choose the type of visualization you want to add (e.g. graph, table, gauge).
3. Configure the data source for your dashboard (e.g. Prometheus, InfluxDB, AppDynamics).
4. Add panels to your dashboard by selecting the metrics you want to display.
5. Customize the appearance of...read more
Q133. How to automate image version iteration to new version during release?
Automate image version iteration by using CI/CD pipelines and version control systems.
Use CI/CD pipelines to automatically build and deploy new versions of the image
Integrate version control systems like Git to manage image versions
Utilize tools like Jenkins, GitLab CI/CD, or CircleCI for automation
Implement versioning schemes like semantic versioning (e.g. 1.0.0, 1.0.1, 1.1.0)
Q134. Can we attach two or more instance to single EBS Volume?
Yes, it is possible to attach multiple instances to a single EBS volume.
This is achieved by using Amazon EBS Multi-Attach feature.
It allows multiple EC2 instances to attach to a single EBS volume simultaneously.
This feature is useful for applications that require high availability and shared access to data.
However, not all EC2 instance types support multi-attach.
It is important to ensure that the application is designed to handle concurrent access to the shared data.
The Linux boot process involves several stages including BIOS, bootloader, kernel initialization, and user space initialization.
BIOS (Basic Input/Output System) performs hardware initialization and loads the bootloader
Bootloader (such as GRUB) loads the Linux kernel into memory and starts its execution
Kernel initializes devices, mounts the root filesystem, and starts the init process
Init process (systemd or SysVinit) initializes user space components and services
Q136. What are the layers of Docker image?
Docker image has 3 layers: Base, Dependencies and Application.
Base layer contains the OS and other system-level libraries.
Dependencies layer contains the libraries and packages required by the application.
Application layer contains the code and files specific to the application.
Each layer is read-only and builds on top of the previous layer.
Changes made to one layer do not affect the other layers.
This layering approach makes Docker images lightweight and easy to share.
Q137. Which mechanism you will you use for handling a live sale load for load balancing? What will be the proposed architecture?
For handling live sale load for load balancing, I would use a combination of horizontal and vertical scaling with a load balancer.
Implement horizontal scaling by adding more instances of the application to distribute the load evenly.
Utilize a load balancer to evenly distribute incoming traffic across multiple instances.
Implement vertical scaling by increasing the resources (CPU, memory) of individual instances to handle increased load.
Use auto-scaling to automatically adjust ...read more
Q138. kubernetes- what are autoscaling methods used. explain
Autoscaling methods in Kubernetes include Horizontal Pod Autoscaler (HPA), Cluster Autoscaler, and Vertical Pod Autoscaler (VPA).
Horizontal Pod Autoscaler (HPA) scales the number of pods based on CPU utilization or custom metrics
Cluster Autoscaler scales the number of nodes in a cluster based on resource utilization
Vertical Pod Autoscaler (VPA) adjusts the resource requests and limits of containers based on usage patterns
HPA can be used with custom metrics like queue length o...read more
Terraform modules are reusable components used to organize and manage resources in Terraform configurations.
Modules help in organizing Terraform configurations into reusable components
They allow for better code reusability and maintainability
Modules can be shared and reused across different Terraform configurations
They encapsulate a set of resources and their configurations
Modules can have input and output variables for customization
Q140. How do you setup the VPC with azure?
Setting up a VPC in Azure involves creating a virtual network, subnets, and configuring security groups.
Create a virtual network in the Azure portal
Define subnets within the virtual network
Configure network security groups to control inbound and outbound traffic
Establish peering connections with other VPCs if needed
Q141. How to run aws ec2 and vpc?.what kind of the can security is provide for they instances.
To run AWS EC2 and VPC, create instances in EC2 and configure security groups in VPC for instance protection.
Create EC2 instances by selecting AMI, instance type, and configuring storage.
Set up VPC with subnets, route tables, and internet gateways for network isolation.
Configure security groups in VPC to control inbound and outbound traffic to instances.
Use IAM roles for secure access to AWS resources.
Implement encryption for data at rest and in transit for enhanced security.
Q142. AWS: How will you access ec2 if u lost ur pem key, S3 types
To access an EC2 instance without a PEM key, you can use AWS Systems Manager Session Manager or create a new key pair and attach it to the instance. There are different types of S3 storage classes such as Standard, Intelligent-Tiering, Glacier, etc.
Use AWS Systems Manager Session Manager to access EC2 without a PEM key
Create a new key pair and attach it to the EC2 instance
S3 storage classes include Standard, Intelligent-Tiering, Glacier, etc.
Q143. Build a docker image which converts HTML page link to PDF file.
Build a Docker image to convert HTML page link to PDF file
Create a Dockerfile with necessary dependencies like wkhtmltopdf
Install wkhtmltopdf in the Docker image
Write a script to convert HTML link to PDF using wkhtmltopdf command
Build the Docker image with the script included
Run the Docker container to convert HTML link to PDF
Q144. Do a github project on Piggymetrics & upload it to Dockerhub.
Setting up Piggymetrics project on Github and Dockerhub
Clone the Piggymetrics project from Github
Create a Dockerfile to build the project into a Docker image
Push the Docker image to Dockerhub
Ensure the project runs successfully in a Docker container
Q145. How Cost Optimization achieved ..? Give a example where you achieved this.
Cost optimization in DevOps is achieved through efficient resource utilization, automation, and continuous monitoring.
Implementing auto-scaling to dynamically adjust resources based on demand
Using containerization to maximize resource utilization and reduce costs
Leveraging cloud services for pay-as-you-go pricing model
Implementing cost monitoring tools to identify and eliminate wasteful spending
Optimizing code and infrastructure for efficiency and performance
Consolidating and...read more
Q146. how do use script to schedule backup in server
To schedule backups in a server using a script, you can use a cron job.
Create a backup script that includes the necessary commands to backup the desired files or directories.
Set the script to be executable using the chmod command.
Create a cron job using the crontab command that specifies the frequency and timing of the backups.
Test the backup script and cron job to ensure they are working correctly.
Q147. What are environments in Azure Devops (pipelines)
Environments in Azure DevOps are logical groups of resources where code is deployed and tested.
Environments can be created for different stages of the development process, such as development, testing, staging, and production.
Each environment can have its own set of resources, such as virtual machines, databases, and storage accounts.
Environments can be configured to automatically deploy code from a pipeline or manually triggered.
Examples of environments include 'Dev', 'QA', ...read more
Q148. What are the responsibility of devops engg
DevOps engineers are responsible for bridging the gap between development and operations teams.
Automating deployment processes
Monitoring system performance
Collaborating with development and operations teams
Ensuring system security and reliability
Implementing continuous integration and delivery
Managing infrastructure and configuration
Troubleshooting issues and providing solutions
Q149. What is current ctc & expected ctc?
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.
Q150. write a docker file? and what are the commands used in dockerfile?
A Dockerfile is a text document that contains all the commands a user could call on the command line to assemble an image.
Use 'FROM' to specify the base image
Use 'RUN' to execute commands in the container
Use 'COPY' to copy files from the host to the container
Use 'CMD' to specify the command to run when the container starts
Use 'EXPOSE' to expose ports
Use 'WORKDIR' to set the working directory
Use 'ENV' to set environment variables
Interview Questions of Similar Designations
Top Interview Questions for Devops Engineer Related Skills
Interview experiences of popular companies
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
Reviews
Interviews
Salaries
Users/Month