Latest DevOps MCQs with Answers and Explanations:
These DevOps MCQs with Answers and Explanations are crafted for students, IT professionals, DevOps engineers, and anyone preparing for DevOps certifications or technical interviews.

DevOps MCQs with Answers and Explanations
1. What is the main goal of DevOps?
A. Increase team size
B. Improve customer support
C. Shorten the software development lifecycle
D. Eliminate the need for QA
Answer: C
Explanation: DevOps aims to shorten the software development lifecycle and increase delivery frequency by improving collaboration between development and operations teams.
2. Which of the following is a common tool used for Continuous Integration (CI)?
A. Docker
B. Jenkins
C. Kubernetes
D. Ansible
Answer: B
Explanation: Jenkins is widely used for automating the CI process, helping teams to build, test, and integrate code continuously.
3. In DevOps, what does ‘Shift Left’ mean?
A. Moving infrastructure to the left
B. Starting work earlier in the day
C. Performing testing earlier in the development cycle
D. Reducing the number of developers
Answer: C
Explanation: ‘Shift Left’ means testing and quality checks are done earlier in the development lifecycle to catch issues sooner.
4. Which of the following best describes Infrastructure as Code (IaC)?
A. Coding in infrastructure languages
B. Manual configuration of servers
C. Managing infrastructure using code and automation tools
D. Writing code for mobile applications
Answer: C
Explanation: IaC uses scripts and automation tools to provision and manage infrastructure, promoting consistency and repeatability.
5. What is the main role of a configuration management tool in DevOps?
A. Code compilation
B. User interface design
C. Consistent system setup and environment configuration
D. Debugging software
Answer: C
Explanation: Configuration management tools like Ansible, Puppet, and Chef help automate and standardize system setup across environments.
6. Which DevOps principle focuses on automation of the software delivery process?
A. Manual deployment
B. Agile delivery
C. Continuous Delivery
D. Waterfall testing
Answer: C
Explanation: Continuous Delivery automates the release process, ensuring software can be released reliably at any time.
7. Which of the following is a container orchestration platform?
A. Jenkins
B. Docker
C. Kubernetes
D. Git
Answer: C
Explanation: Kubernetes is a platform for automating the deployment, scaling, and operation of application containers.
8. What is a key benefit of Continuous Integration?
A. Slower development process
B. Infrequent feedback
C. Early detection of integration issues
D. More manual testing
Answer: C
Explanation: Continuous Integration helps detect issues early by integrating code frequently and automatically running tests.
9. Which of these is not typically part of a DevOps toolchain?
A. Version control system
B. Continuous integration server
C. Spreadsheet software
D. Monitoring tools
Answer: C
Explanation: Spreadsheet software is not part of the DevOps automation pipeline, whereas version control, CI, and monitoring are core components.
10. What is the main advantage of using containers in DevOps?
A. Increased memory usage
B. Vendor lock-in
C. Consistent environment across development and production
D. Slower startup time
Answer: C
Explanation: Containers ensure that software runs the same in development, testing, and production environments, reducing errors due to environment differences.
11. Which DevOps practice ensures that code changes are automatically tested and integrated into a shared repository?
A. Infrastructure as Code
B. Continuous Monitoring
C. Continuous Integration
D. Incident Management
Answer: C
Explanation: Continuous Integration (CI) ensures code is frequently merged into a shared repository and tested automatically to detect issues early.
12. What does the ‘Fail Fast’ principle in DevOps mean?
A. Failing after deployment
B. Ignoring small bugs
C. Detecting and addressing failures early in the development process
D. Skipping testing stages
Answer: C
Explanation: ‘Fail Fast’ encourages quick detection and resolution of issues during early development stages to reduce the cost and impact of failures.
13. Which DevOps tool is primarily used for containerization?
A. Git
B. Jenkins
C. Docker
D. Puppet
Answer: C
Explanation: Docker packages applications into containers, allowing them to run consistently across different environments.
14. Which tool is commonly used for Infrastructure as Code (IaC)?
A. Terraform
B. Jenkins
C. Nagios
D. Git
Answer: A
Explanation: Terraform is a popular open-source IaC tool used to provision infrastructure using declarative configuration files.
15. What is a key outcome of using automated testing in DevOps?
A. More human errors
B. Delayed feedback
C. Faster and more reliable software releases
D. Increased cost
Answer: C
Explanation: Automated testing helps detect bugs quickly, accelerates feedback loops, and enables reliable continuous delivery.
16. In DevOps, what does ‘Blue-Green Deployment’ refer to?
A. Testing in production only
B. Manual deployment strategies
C. Running two environments to reduce downtime
D. Using colored user interfaces
Answer: C
Explanation: Blue-Green Deployment involves running two environments—one live (blue) and one idle (green)—to switch between versions without downtime.
17. What is the purpose of a version control system in DevOps?
A. Managing user permissions
B. Tracking and managing changes to source code
C. Performing automated backups
D. Monitoring server metrics
Answer: B
Explanation: Version control systems like Git track code changes, allow collaboration, and support rollback to previous versions.
18. Which of the following tools is a continuous integration server?
A. Nagios
B. GitHub
C. Jenkins
D. Prometheus
Answer: C
Explanation: Jenkins automates the build and integration process, allowing teams to continuously test and deploy code.
19. What is the role of configuration management in DevOps?
A. Managing graphic design assets
B. Ensuring consistent software behavior across environments
C. Handling customer tickets
D. Compiling Java code
Answer: B
Explanation: Configuration management tools ensure environments are consistently configured, reducing deployment issues.
20. Which DevOps tool specializes in monitoring and alerting?
A. Docker
B. Git
C. Prometheus
D. Kubernetes
Answer: C
Explanation: Prometheus is used to collect metrics, monitor system performance, and trigger alerts based on thresholds.
21. What does CI/CD stand for in DevOps?
A. Continuous Innovation / Constant Debugging
B. Continuous Integration / Continuous Delivery (or Deployment)
C. Code Injection / Code Deployment
D. Continuous Implementation / Centralized Deployment
Answer: B
Explanation: CI/CD automates code integration, testing, and delivery to accelerate the release pipeline with fewer errors.
22. What is a primary reason organizations adopt DevOps?
A. To increase cost
B. To extend project timelines
C. To improve collaboration and accelerate delivery
D. To eliminate operations teams
Answer: C
Explanation: DevOps breaks down silos between development and operations to improve speed, quality, and collaboration.
23. Which term best describes the process of automatically deploying code to production after it passes all tests?
A. Continuous Integration
B. Continuous Deployment
C. Manual Deployment
D. Waterfall Delivery
Answer: B
Explanation: Continuous Deployment goes one step beyond Continuous Delivery by automatically deploying to production without manual approval.
24. Which of the following is a benefit of DevOps automation?
A. Manual interventions are encouraged
B. Slower release cycles
C. Fewer human errors and faster feedback
D. Higher resistance to change
Answer: C
Explanation: Automation reduces manual work, minimizes errors, and speeds up the feedback loop, enhancing overall productivity.
25. In DevOps, what is meant by ‘immutable infrastructure’?
A. Infrastructure that changes frequently
B. Infrastructure that is manually edited
C. Infrastructure that is replaced instead of modified
D. Static codebases
Answer: C
Explanation: Immutable infrastructure involves deploying new instances rather than updating existing ones, ensuring consistency and reproducibility.
26. What is the function of a service mesh in microservices architecture?
A. It replaces all APIs
B. Handles inter-service communication, security, and observability
C. Manages user logins
D. Automates front-end testing
Answer: B
Explanation: A service mesh (e.g., Istio) manages how services interact, providing traffic control, observability, and security features.
27. Which practice enables teams to release features to specific users while keeping them hidden from others?
A. Canary Deployment
B. Feature Flagging
C. Rolling Updates
D. Blue-Green Testing
Answer: B
Explanation: Feature flags (or toggles) allow you to enable or disable features at runtime, targeting specific users without deploying new code.
28. What is the role of ‘observability’ in DevOps?
A. Managing HR policies
B. Understanding system behavior using logs, metrics, and traces
C. Encrypting user passwords
D. Performing UI/UX testing
Answer: B
Explanation: Observability enables teams to detect, diagnose, and resolve performance or reliability issues using telemetry data.
29. Which DevOps principle encourages small, incremental changes over large batch releases?
A. Waterfall planning
B. Big bang delivery
C. Trunk-based development
D. Shadow deployment
Answer: C
Explanation: Trunk-based development encourages frequent, small commits to the main code branch, reducing integration challenges.
30. What is the goal of continuous monitoring in DevOps?
A. Delay alerts
B. Monitor code quality only
C. Detect and respond to operational issues in real time
D. Track developer productivity
Answer: C
Explanation: Continuous monitoring tracks system health, performance, and security in real-time to ensure smooth operations.
31. Which of the following best describes a microservices architecture?
A. A single, large application with all components tightly coupled
B. Independent, loosely coupled services that communicate via APIs
C. A style of designing front-end interfaces
D. An outdated monolithic system
Answer: B
Explanation: Microservices architecture breaks down applications into smaller, independently deployable services, promoting scalability and agility.
32. What does a ‘pipeline’ refer to in DevOps?
A. A physical network
B. A series of manual approvals
C. An automated process of building, testing, and deploying code
D. A financial transaction model
Answer: C
Explanation: A pipeline automates software delivery stages from code commit to deployment, ensuring efficiency and consistency.
33. What is the role of Git in DevOps?
A. Automating testing
B. Managing server resources
C. Version control for tracking code changes
D. Scheduling cron jobs
Answer: C
Explanation: Git is a distributed version control system that tracks changes and supports collaboration among developers.34. What is a ‘canary deployment’?
A. A type of manual deployment
B. Deploying new changes to a small subset of users before full rollout
C. Using birds to test code
D. Running apps only at night
Answer: B
Explanation: Canary deployments reduce risk by gradually rolling out changes and observing behavior before full deployment.
35. Which file does Docker use to define how an image is built?
A. image.txt
B. docker-compose.yaml
C. Dockerfile
D. build.config
Answer: C
Explanation: Docker uses a Dockerfile to define instructions for creating a container image, such as base OS, dependencies, and commands.
36. What is the purpose of docker-compose
?
A. Monitoring container logs
B. Running unit tests
C. Defining and running multi-container Docker applications
D. Encrypting Docker images
Answer: C
Explanation: docker-compose
helps define and manage multi-container applications using a YAML file for orchestration.
37. What is a ‘rollback’ in DevOps deployment?
A. Upgrading to the latest version
B. Reverting to a previous stable version after a failed deployment
C. Committing changes to Git
D. Shutting down the server
Answer: B
Explanation: Rollbacks are used to quickly restore a previous version of the application if a new release causes problems.
38. Which DevOps tool is used for log aggregation and visualization?
A. Git
B. Jenkins
C. Grafana
D. ELK Stack
Answer: D
Explanation: The ELK Stack (Elasticsearch, Logstash, Kibana) is commonly used to collect, search, and visualize log data.
39. What is the purpose of load balancing in DevOps?
A. To slow down system performance
B. To direct traffic evenly across multiple servers
C. To encrypt user data
D. To increase latency
Answer: B
Explanation: Load balancers distribute network traffic across multiple servers to ensure reliability and performance under load.
40. Which of the following is a popular tool for container orchestration?
A. Vagrant
B. Jenkins
C. Kubernetes
D. CircleCI
Answer: C
Explanation: Kubernetes automates deployment, scaling, and management of containerized applications in clustered environments.
41. What does YAML stand for in DevOps context?
A. Yet Another Markup Language
B. Yes And Maybe Later
C. You Are My Leader
D. YAML And More Logic
Answer: A
Explanation: YAML stands for “Yet Another Markup Language” and is used in DevOps tools like Kubernetes and Ansible for configuration files due to its readability.42. What is the purpose of using tags in version control systems like Git?
A. To create duplicates
B. To assign tickets to developers
C. To mark specific points in history as important (e.g., releases)
D. To increase file size
Answer: C
Explanation: Tags in Git are often used to mark release versions or significant commits, helping in easy reference and deployment.
43. Which command is used to create a Docker image from a Dockerfile?
A. docker run
B. docker commit
C. docker build
D. docker init
Answer: C
Explanation: docker build
reads instructions from a Dockerfile and creates an image that can later be run as a container.
44. What is a key feature of Ansible?
A. Requires agent installation on nodes
B. Uses Python scripts for all tasks
C. Agentless automation using SSH
D. GUI-only interface
Answer: C
Explanation: Ansible is agentless and connects to nodes over SSH, which makes it lightweight and easy to use in a DevOps environment.
45. Which of the following is a monitoring tool that collects and visualizes metrics?
A. GitHub
B. Docker
C. Grafana
D. Ansible
Answer: C
Explanation: Grafana is an open-source analytics and interactive visualization tool often used with Prometheus for system monitoring.
46. What is the purpose of a reverse proxy in DevOps architecture?
A. To connect directly to databases
B. To store code
C. To route client requests to backend servers and provide load balancing
D. To manage Git repositories
Answer: C
Explanation: Reverse proxies distribute client requests to backend servers, improve performance, and often add SSL termination or caching.
47. Which type of testing is commonly automated in a DevOps pipeline?
A. Market testing
B. Unit and integration testing
C. Manual user acceptance testing
D. Beta testing
Answer: B
Explanation: Unit and integration tests are typically automated in CI/CD pipelines to detect errors early and ensure components work together.
48. Which one is a cloud-based DevOps solution from Microsoft?
A. Azure DevOps
B. GitLab
C. Bitbucket
D. JenkinsX
Answer: A
Explanation: Azure DevOps is Microsoft’s end-to-end DevOps platform offering version control, CI/CD, test management, and agile planning tools.
49. Which file format is used for Kubernetes deployment configurations?
A. XML
B. JSON
C. YAML
D. TXT
Answer: C
Explanation: Kubernetes uses YAML files to define deployments, services, pods, and other configuration resources due to its simplicity and readability.
50. What is ‘DevSecOps’ focused on?
A. Eliminating developers
B. Security integrated into every phase of the DevOps lifecycle
C. A testing-only methodology
D. Managing HR operations
Answer: B
Explanation: DevSecOps ensures security is a shared responsibility throughout the DevOps workflow—from development to deployment.
51. Which of the following best defines “Infrastructure as Code” (IaC)?
A. Writing backend code for infrastructure design
B. Managing servers manually
C. Using code to provision and manage infrastructure automatically
D. Creating user interfaces for system tools
Answer: C
Explanation: Infrastructure as Code treats infrastructure setup as software, allowing automated provisioning and version control using tools like Terraform or Ansible.
52. What is the main goal of a DevOps culture in an organization?
A. Isolate development from operations
B. Focus solely on security
C. Break down silos and foster collaboration between teams
D. Increase dependency on manual tasks
Answer: C
Explanation: DevOps promotes a culture of shared responsibility and collaboration across development, operations, QA, and security.
53. Which tool is widely used for managing Kubernetes clusters?
A. GitLab
B. Jenkins
C. Helm
D. Nagios
Answer: C
Explanation: Helm is a package manager for Kubernetes that simplifies deployment and management of applications within clusters.
54. What is the role of a ‘build server’ in CI/CD?
A. Managing customer support
B. Tracking software licenses
C. Compiling source code and running automated tests
D. Performing static UI testing
Answer: C
Explanation: A build server automates the building, testing, and packaging of source code, ensuring continuous integration of clean code.
55. What is the purpose of using “artifacts” in a DevOps pipeline?
A. To store images for testing
B. To track network traffic
C. To store build outputs (like binaries) for later use
D. To generate deployment logs
Answer: C
Explanation: Artifacts are the resulting files from a build process, such as compiled applications, libraries, or Docker images, used in later pipeline stages.
56. Which metric helps measure the frequency of successful software releases?
A. Mean Time to Repair (MTTR)
B. Deployment Frequency
C. Cycle Time
D. Code Churn
Answer: B
Explanation: Deployment Frequency measures how often new code is successfully deployed to production, reflecting DevOps efficiency.
57. In Kubernetes, what is a “pod”?
A. A group of users
B. The smallest deployable unit, representing one or more containers
C. A collection of environment variables
D. A CI/CD job step
Answer: B
Explanation: A pod is the smallest execution unit in Kubernetes that can host one or more tightly coupled containers sharing the same resources.
58. What is the primary role of a DevOps engineer?
A. Only write frontend code
B. Manage payroll systems
C. Bridge the gap between development and operations through automation and collaboration
D. Design marketing campaigns
Answer: C
Explanation: A DevOps engineer enables faster development and deployment by automating infrastructure, pipelines, and integrating Dev and Ops practices.
59. What is the main function of a container registry like Docker Hub?
A. Scanning for vulnerabilities
B. Managing code branches
C. Storing and distributing container images
D. Monitoring traffic logs
Answer: C
Explanation: A container registry stores Docker images and allows them to be pulled by systems or pipelines for deployment.
60. Which DevOps practice focuses on collecting, analyzing, and responding to application performance data?
A. Static code analysis
B. Continuous Monitoring
C. Code Reviews
D. Load Balancing
Answer: B
Explanation: Continuous Monitoring helps ensure application reliability and health by providing visibility into logs, metrics, and events in real-time.
61. Which component in a CI/CD pipeline is responsible for testing code before it’s merged?
A. Code Repository
B. Build Agent
C. Test Automation Suite
D. Manual QA Team
Answer: C
Explanation: Automated test suites in the CI/CD pipeline validate code correctness, functionality, and stability before allowing integration or deployment.
62. Which of the following tools is commonly used for managig secrets and sensitive configurations?
A. Jenkins
B. Kubernetes
C. HashiCorp Vault
D. Prometheus
Answer: C
Explanation: Vault by HashiCorp securely manages secrets, API keys, credentials, and encrypted data access in DevOps environments.
63. What is a “blue-green deployment” strategy?
A. Deployment based on the day of the week
B. Two identical environments where only one is live at a time
C. Rolling back deployments by color codes
D. A backup strategy for legacy systems
Answer: B
Explanation: In blue-green deployments, traffic is switched between two identical environments—one active (blue), one standby (green)—to reduce downtime and risk.
64. In DevOps, what is meant by “shift-left” testing?
A. Performing testing in the final production stage
B. Running tests manually
C. Testing earlier in the development cycle
D. Shifting UI components to the left
Answer: C
Explanation: Shift-left testing involves moving testing earlier in the development lifecycle to catch bugs sooner and reduce costly fixes later.
65. What is an advantage of containerization in DevOps?
A. Increases system dependency conflicts
B. Reduces portability
C. Ensures consistent environments from development to production
D. Requires more hardware resources
Answer: C
Explanation: Containers package applications with their dependencies, ensuring they run the same across all environments—reducing “it works on my machine” issues.
66. What does “rolling deployment” mean?
A. Releasing the application during office hours only
B. Releasing updates to all servers at once
C. Incrementally updating servers or instances over time
D. Undoing every deployment step manually
Answer: C
Explanation: Rolling deployments minimize risk by gradually releasing updates to a portion of servers instead of all at once.
67. Which protocol is most commonly used by Ansible to connect with remote machines?
A. FTP
B. SSH
C. HTTP
D. RPC
Answer: B
Explanation: Ansible uses SSH (Secure Shell) to connect to and execute tasks on remote nodes, making it agentless and easy to configure.
68. What is the main function of Prometheus in a DevOps ecosystem?
A. Source control
B. Code formatting
C. Time-series monitoring and alerting
D. CI/CD orchestration
Answer: C
Explanation: Prometheus collects and stores metrics as time series data, making it ideal for infrastructure and application monitoring.
69. In Git, what is a “merge conflict”?
A. A syntax error
B. A failure to build
C. A situation where changes in two branches interfere with each other
D. A type of pipeline failure
Answer: C
Explanation: Merge conflicts occur when two branches modify the same part of a file differently, requiring manual resolution before merging.
70. Which type of testing ensures that changes in code do not negatively affect existing functionality?
A. Load Testing
B. Regression Testing
C. Smoke Testing
D. A/B Testing
Answer: B
Explanation: Regression testing validates that new code changes haven’t broken or altered existing functionality, ensuring consistent behavior.
71. What is the primary role of Jenkins in a DevOps pipeline?
A. Source code versioning
B. Infrastructure provisioning
C. Automating builds and continuous integration
D. Front-end development
Answer: C
Explanation: Jenkins is a widely used CI/CD tool that automates the building, testing, and deployment of applications.
72. What is meant by “immutable infrastructure”?
A. Infrastructure that never runs
B. Infrastructure that changes constantly
C. Servers or components that are replaced instead of modified
D. Systems that require manual updates
Answer: C
Explanation: Immutable infrastructure ensures consistency by replacing components with new versions rather than altering existing ones.
73. Which of the following is a key benefit of Continuous Deployment?
A. Manual approval gates
B. Delayed user feedback
C. Faster release cycles with minimal manual intervention
D. Increased error-prone releases
Answer: C
Explanation: Continuous Deployment enables automatic deployment of every code change that passes testing, accelerating time-to-market.
74. What command is used to create a new branch in Git?
A. git init
B. git commit
C. git branch <name>
D. git clone
Answer: C
Explanation: git branch <name>
creates a new branch to isolate development efforts or features.
75. What is a ‘service mesh’ used for in microservices architecture?
A. Building monolithic apps
B. Managing container registries
C. Controlling communication between microservices
D. Hosting DNS servers
Answer: C
Explanation: A service mesh handles microservice-to-microservice communication, offering features like traffic management, load balancing, and security.
76. Which language is most commonly used to write Terraform configurations?
A. YAML
B. HCL (HashiCorp Configuration Language)
C. XML
D. JSON
Answer: B
Explanation: Terraform uses HCL, a human-readable language designed for defining infrastructure as code.
77. What does ‘MTTR’ stand for in DevOps?
A. Mean Time to Release
B. Most Tested Technical Routine
C. Mean Time to Recovery/Repair
D. Master Testing Tool Registry
Answer: C
Explanation: MTTR measures the average time taken to restore service after a failure — a key reliability metric in DevOps.
78. Which DevOps tool uses “playbooks” to automate configurations?
A. Jenkins
B. Ansible
C. Kubernetes
D. Git
Answer: B
Explanation: Ansible uses YAML-based playbooks to define automation tasks for configuring and managing systems.
79. What is a common use case for using Docker Compose?
A. Writing unit tests
B. Building JavaScript UIs
C. Managing multi-container applications locally
D. Encrypting Docker volumes
Answer: C
Explanation: Docker Compose lets developers define and run multi-container Docker apps using a simple YAML file.
80. Which of these tools is primarily used for performance monitoring and observability?
A. Bitbucket
B. SonarQube
C. Prometheus
D. Vagrant
Answer: C
Explanation: Prometheus is a time-series database designed for real-time monitoring and alerting in cloud-native applications.
81. Which of these is NOT a phase in the DevOps lifecycle?
A. Plan
B. Develop
C. Sleep
D. Deploy
Answer: C
Explanation: The DevOps lifecycle includes phases like plan, develop, test, release, deploy, operate, and monitor—but not “sleep.”
82. What’s the function of an artifact repository like JFrog Artifactory?
A. Writing test cases
B. Hosting Git repositories
C. Storing and managing build artifacts
D. Running CI pipelines
Answer: C
Explanation: Artifact repositories store artifacts generated during the CI/CD process, such as JAR files, Docker images, and more.
83. Which command is used to check the status of the current Git repository?
A. git pull
B. git status
C. git clone
D. git fetch
Answer: B
Explanation: git status
displays the state of the working directory and staged changes, helping track project status.
84. What is the use of labels in Kubernetes?
A. To schedule cron jobs
B. To manage user logins
C. To organize and select groups of objects
D. To control memory usage
Answer: C
Explanation: Labels in Kubernetes are key-value pairs attached to resources, helping in selection, filtering, and grouping of objects.
85. What is the purpose of CI in DevOps?
A. Central Integration
B. Continuous Improvement
C. Continuous Integration
D. Code Injection
Answer: C
Explanation: Continuous Integration automates code merging and testing to identify issues early in the development lifecycle.
86. What is a release candidate (RC)?
A. A failed deployment
B. A beta test version that’s stable and ready for release
C. A rollback version
D. A pre-alpha build
Answer: B
Explanation: An RC is a build that’s feature-complete and stable, and potentially ready for final release unless bugs are found.
87. Which DevOps practice improves reliability by automatically restoring services after failures?
A. Feature branching
B. Load testing
C. Self-healing systems
D. Manual failover
Answer: C
Explanation: Self-healing systems monitor themselves and automatically recover from issues to ensure high availability.
88. What does the term “ephemeral environment” refer to?
A. A static legacy server
B. A long-lived test environment
C. A temporary environment created for testing or builds
D. An on-premise network
Answer: C
Explanation: Ephemeral environments are short-lived and often used in CI/CD workflows to isolate and test builds before teardown.
89. Which of the following is true about monolithic applications?
A. They are faster to deploy
B. They are built as a single codebase and deployed together
C. They require container orchestration
D. They scale more easily than microservices
Answer: B
Explanation: Monolithic apps consist of a single unified codebase where all features are deployed together, making scaling harder.
90. What is the function of SonarQube in DevOps?
A. Container deployment
B. Application logging
C. Continuous code quality inspection
D. Package management
Answer: C
Explanation: SonarQube analyzes code for bugs, vulnerabilities, and code smells, helping ensure maintainability and quality.
91. What is the primary purpose of “canary deployments”?
A. Test a new feature internally
B. Fully replace production with new code
C. Release changes to a small subset of users to monitor impact
D. Deploy across all environments at once
Answer: C
Explanation: Canary deployments release new features to a small audience before a full rollout, helping detect issues early without affecting all users.
92. Which command is used in Docker to list running containers?
A. docker show
B. docker run
C. docker list
D. docker ps
Answer: D
Explanation: docker ps
lists all running containers and their statuses, ports, and other runtime information.
93. What is a major benefit of using microservices architecture in DevOps?
A. Easier monolithic scaling
B. Centralized failure handling
C. Independent deployment of services
D. Reduced application complexity
Answer: C
Explanation: Microservices allow teams to build, test, deploy, and scale individual components independently, promoting agility and resilience.
94. Which AWS service is commonly used for CI/CD automation?
A. AWS CloudTrail
B. AWS Lambda
C. AWS CodePipeline
D. Amazon S3
Answer: C
Explanation: AWS CodePipeline automates the build, test, and deployment phases, making it ideal for DevOps workflows.
95. What is the main goal of Configuration Management in DevOps?
A. Deploying containers
B. Manually tracking server state
C. Maintaining system consistency through automated configuration
D. Backing up databases
Answer: C
Explanation: Configuration management tools like Ansible or Puppet ensure infrastructure is configured consistently across environments.
96. What is the purpose of the .gitignore
file in a Git repository?
A. To delete Git history
B. To list collaborators
C. To specify files that Git should ignore during commits
D. To encrypt the repository
Answer: C
Explanation: .gitignore
defines files and directories that shouldn’t be tracked by Git, such as logs, temporary files, and build artifacts.
97. Which command initializes a new Git repository?
A. git start
B. git push
C. git init
D. git log
Answer: C
Explanation: git init
creates a new local Git repository, preparing the project directory for version control.
98. What is the purpose of a “reverse proxy” in DevOps infrastructure?
A. To redirect users to the admin panel
B. To serve content from external APIs
C. To route client requests to appropriate backend servers
D. To bypass firewall restrictions
Answer: C
Explanation: Reverse proxies like NGINX or HAProxy handle load balancing, security, and routing between clients and backend servers.
99. What is GitOps in the context of DevOps?
A. Using Git for static site generation
B. Managing user roles in GitHub
C. Using Git as the source of truth to automate infrastructure operations
D. Git versioning only for documentation
Answer: C
Explanation: GitOps uses Git repositories as the source of truth for declarative infrastructure and applications, enabling automated, auditable operations.
100. Which of the following is a core benefit of DevOps practices?
A. Longer release cycles
B. Reduced automation
C. Enhanced collaboration and faster delivery
D. Higher manual intervention
Answer: C
Explanation: DevOps promotes collaboration, automation, and continuous improvement to reduce delivery time and increase software quality.
Subscribe to Tech Intelix free Webinars.