Devops Engineer
800+ Devops Engineer Interview Questions and Answers
You are given a string 'STR'. The string contains [a-z] [A-Z] [0-9] [special characters]. You have to find the reverse of the string.
For example:
If the given string is: STR = "abcde". You h...read more
Q2. if you want to connect multiple vpc ,we have 2 or 3 vpc, you have to connect ec2 to each vpc? so how you can achieve that?
To connect multiple VPCs, we can use VPC peering or VPN connections.
Create a VPC peering connection between the VPCs
Configure route tables to allow traffic between the VPCs
Alternatively, create VPN connections between the VPCs
Attach EC2 instances to the appropriate VPCs
Devops Engineer Interview Questions and Answers for Freshers
Q3. How to run a docker command remotely. i.e. Docker is installed on both your laptop and a remote linux server. You need to run docker command on the linux server but without taking a separate ssh session to the ...
read moreYou can use the Docker API to remotely run Docker commands on a Linux server without taking a separate SSH session.
Use the Docker API to interact with the Docker daemon on the remote Linux server.
Make sure Docker is installed and running on both your laptop and the remote server.
Authenticate with the remote server using appropriate credentials.
Establish a connection to the Docker daemon on the remote server using the Docker API.
Send the desired Docker command to the remote se...read more
You are given an integer ‘N’ and there is a hidden number in the range [0, N] which you have to guess. You are also given a function higherLower(k) to help you in guessing the number. The ‘highe...read more
Q5. Docker command to transfer an image from one machine to another without using docker registry
Docker save and Docker load commands can be used to transfer an image from one machine to another without using a Docker registry.
Use the 'docker save' command to save the image as a tar file on the source machine
Transfer the tar file to the destination machine using any file transfer method (e.g., scp)
On the destination machine, use the 'docker load' command to load the image from the tar file
Q6. Which programming languages do you use regularly in your work?
I use multiple programming languages depending on the task at hand.
Python for automation and scripting
Java for building applications
Bash for shell scripting
SQL for database management
JavaScript for web development
Go for microservices
Perl for text processing
C/C++ for system-level programming
Share interview questions and help millions of jobseekers 🌟
How Jenkins knows when to execute a Scheduled job/pipeline and how it is triggered?
Q8. How to copy a commit one branch to another branch?
To copy a commit from one branch to another, use the git cherry-pick command.
Checkout the branch where you want to copy the commit
Find the commit hash of the commit you want to copy
Run 'git cherry-pick
' to apply the commit to the current branch
Devops Engineer Jobs
Q9. How we can create EC2 instance by using terraform ? (write)
To create an EC2 instance using Terraform, define the necessary resources in a Terraform configuration file and run 'terraform apply'.
Write a Terraform configuration file with the necessary resources, such as 'aws_instance' for EC2 instance.
Specify the required parameters like 'ami', 'instance_type', 'subnet_id', etc.
Run 'terraform init' to initialize the working directory.
Run 'terraform plan' to see the execution plan.
Run 'terraform apply' to create the EC2 instance.
Verify t...read more
How to copy Docker images from one host to another without using a repository?
Q11. your container running service is up but you are facing any issue , how to troubleshoot them?
To troubleshoot issues with a running container service, follow these steps:
Check the logs of the container to identify any errors or warnings
Verify that the container is running on the correct port and IP address
Check the network connectivity between the container and other services
Verify that the container has access to the required resources and dependencies
Restart the container or redeploy the service if necessary
Q12. who do you debug the error and which method do you choose
Debugging errors involves identifying the root cause and using appropriate methods to resolve it.
Start by reproducing the error and gathering relevant information
Use debugging tools like logs, stack traces, and breakpoints to identify the root cause
Once the root cause is identified, use appropriate methods like code changes or configuration updates to resolve the error
Test the solution thoroughly to ensure it does not cause any new errors
Q13. if you change the infrasrtuctur in aws management console will it change statefile
Yes, changing infrastructure in AWS management console will change statefile.
Any changes made in the AWS management console will be reflected in the statefile.
The statefile is a record of the current state of the infrastructure.
For example, if you add a new EC2 instance in the management console, it will be reflected in the statefile.
What is Continuous Testing (CT)?
Q15. Execute a command to show whether httpd service is running or not
Command to check httpd service status
Use the command 'systemctl status httpd' to check the status of httpd service
If httpd service is running, the output will show 'active (running)'
If httpd service is not running, the output will show 'inactive (dead)'
How do you block specific IPs on your EC2 instance (AWS)?
Q17. explain pipeline whatever you can write in code how will you deploy the code ? tell me just steps?
Pipeline is a set of automated processes that build, test, and deploy code changes.
Create a code repository
Write code and commit changes to the repository
Trigger a build process to compile and package the code
Run automated tests to ensure code quality
Deploy the code to a staging environment for further testing
If tests pass, deploy the code to production environment
Monitor the application for issues and repeat the process for new changes
What is load average in Linux?
What is LVM and why is it required?
Q20. How to check logs for pods and containers in kubernets ?
To check logs for pods and containers in Kubernetes, you can use the kubectl command-line tool.
Use the 'kubectl logs' command to view logs for a specific pod or container.
Specify the pod or container name along with the appropriate flags.
You can also use selectors to filter logs based on labels or namespaces.
To follow logs in real-time, use the '-f' flag.
To limit the number of lines displayed, use the '--tail' flag.
To view logs from multiple containers in a pod, use the '--co...read more
How does AWS contribute to DevOps?
How many Docker components are there?
What is docker image registry?
What is the command used to delete a branch?
How to monitor the Kubernetes cluster?
Q26. What is the usecase which would require setup of distributed jenkins nodes
Distributed Jenkins nodes are used to handle large-scale builds and improve performance.
Large-scale builds: When there are a large number of builds to be executed simultaneously, distributed Jenkins nodes can handle the load by distributing the builds across multiple nodes.
Improved performance: By distributing the workload, the overall build time can be reduced, resulting in improved performance.
Resource utilization: Distributed nodes allow for better utilization of resources...read more
Q27. from where you can download 3rd party libraries which you created during deployment?
Third-party libraries can be downloaded from package managers or repositories.
Package managers like npm, pip, and Maven can be used to download third-party libraries.
Repositories like GitHub, GitLab, and Bitbucket can also be used to download libraries.
Some cloud providers like AWS and Azure have their own repositories for third-party libraries.
Libraries can also be downloaded from the official website of the library or the developer.
How to debug a website template which is very slow?
What does the load balancer do when an instance in AWS is deregistered?
What is the usecase which would require setup of distributed jenkins nodes?
Q31. If you want to restrict the communication between the kubernetes pod, how would you restrict that one?
Restricting communication between Kubernetes pods can be achieved using network policies.
Use Network Policies in Kubernetes to define rules for pod-to-pod communication
Specify which pods are allowed to communicate with each other based on labels
Deny all traffic by default and only allow specific traffic as needed
Example: Define a network policy to allow communication only between pods with label 'app=frontend' and 'app=backend'
How would you debug apache nginx issues ?
How would you prevent a DDOS attack ?
What are terraform modules ?
Q35. how to work DNS in Linux ? what is the record of DNS?
DNS in Linux is managed through configuration files and commands. DNS records contain information about domain names and IP addresses.
DNS in Linux is managed through the /etc/resolv.conf file which contains the IP addresses of DNS servers.
The 'nslookup' command can be used to query DNS records for a specific domain name.
DNS records include A records (IP address), MX records (mail server), CNAME records (alias), and more.
DNS caching can improve performance by storing frequentl...read more
Can you tell the difference between CMD and ENTRYPOINT?
What do you know about git reflog?
Q38. how communication happens between two pods in different namespaces?
Communication between pods in different namespaces is possible through services or network policies.
Use services to allow communication between pods in different namespaces
Create network policies to control traffic flow between pods in different namespaces
Ensure proper DNS resolution for pods in different namespaces
What are the use cases of running Docker inside Docker?
Q40. If pipeline breaks in production environment, how do you handle it?
I would follow the incident management process to identify the root cause and resolve the issue as quickly as possible.
Notify the relevant stakeholders and initiate the incident management process
Identify the root cause of the issue and take corrective actions
Rollback to the previous stable version if necessary
Communicate the status and progress of the incident to stakeholders
Conduct a post-incident review to identify areas of improvement
Q41. what is meaning of transite gateway? why we can use transite gateway?
Transit Gateway is a network transit hub that enables interconnectivity between virtual private clouds (VPCs) and on-premises networks.
Transit Gateway simplifies network architecture by allowing multiple VPCs and VPN connections to connect to a single gateway.
It provides a hub-and-spoke model for connecting VPCs and on-premises networks.
Transit Gateway also supports routing between VPCs and on-premises networks, and can be used to consolidate VPC peering connections.
It can al...read more
What is Kubernetes Load Balancing?
Q43. what is testing ? Ans: As a part of testing excruciation after complete the Release mode we can get in to the against to the daily integration test .system integration test .user accepting test .production as l...
read moreTesting is the process of evaluating a system or its component(s) with the intent to find whether it satisfies the specified requirements or not.
Testing is done to ensure that the software meets the requirements and works as expected.
It involves executing a system or its component(s) with the intent of finding errors or defects.
Testing can be done at various stages of the software development life cycle such as unit testing, integration testing, system testing, and acceptance...read more
Describe the lifecycle of Docker Container
How will you kill all java process in one command ?
What is load average in Linux?
Q47. for tomcat security and harden, what precaution you can taken?
To secure and harden Tomcat, several precautions can be taken.
Disable unused connectors and ports
Use SSL/TLS encryption for secure communication
Implement access control and authentication mechanisms
Regularly update Tomcat and its dependencies
Configure logging and monitoring for security events
Q48. What are key elements which are there in continuous testing tools?
Key elements in continuous testing tools include automation, integration with CI/CD pipelines, reporting and analytics, scalability, and support for various testing types.
Automation of test cases to ensure quick feedback on code changes
Integration with CI/CD pipelines for seamless testing in the software delivery process
Reporting and analytics capabilities to track test results and identify issues
Scalability to handle testing across different environments and configurations
Su...read more
Q49. What are the various branching strategies used in the version control system?
Various branching strategies in version control systems help manage code changes effectively.
Mainline/Branch by Release: Each release has its own branch for bug fixes and maintenance.
Feature Branching: Each new feature is developed in a separate branch and merged back to main branch after completion.
Gitflow Workflow: Uses main, develop, feature, release, and hotfix branches for a structured workflow.
Trunk-Based Development: All developers work on a single branch, promoting co...read more
Q50. how to troubleshoot when ec2 has not access to me?
To troubleshoot EC2 not having access to me, check security groups, network ACLs, and routing tables.
Check if the EC2 instance is in the correct security group
Verify that the security group allows inbound traffic from your IP address or CIDR block
Check if there are any network ACLs that may be blocking traffic
Verify that the routing table is correctly configured
Check if there are any firewall rules on your local machine that may be blocking traffic
Use tools like ping, tracero...read more
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