







































































Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!








































































Question 1. Which of the following best describes the “First Way” of the Three Ways in DevOps? A) Accelerating feedback loops between development and operations B) Ensuring that work flows from development to operations as smoothly as possible C) Creating a culture of continuous learning and experimentation D) Automating security testing early in the pipeline Answer: B Explanation: The First Way focuses on improving the flow of work from development to operations, reducing hand‑offs and delays. Question 2. In the CALMS framework, which component directly addresses the measurement of performance and outcomes? A) Culture B) Automation C) Lean D) Measurement Answer: D Explanation: Measurement provides metrics and data that enable teams to assess speed, quality, and value. Question 3. Which metric is most commonly used to express the “lead time for changes” in a DevOps environment? A) Mean Time to Recover (MTTR) B) Deployment Frequency C) Cycle Time from code commit to production D) Change Failure Rate Answer: C Explanation: Lead time for changes is the elapsed time from a code commit to its successful deployment in production.
Question 4. What is the primary advantage of trunk‑based development over long‑lived feature branches? A) Allows developers to work offline for longer periods B) Reduces merge conflicts and promotes continuous integration C) Enables multiple releases from the same branch simultaneously D) Improves code review depth by delaying integration Answer: B Explanation: Trunk‑based development encourages frequent merges to the mainline, minimizing integration pain. Question 5. Which Git command rewrites the commit history of a branch by moving its base to a new point? A) git merge B) git rebase C) git cherry-pick D) git revert Answer: B Explanation: git rebase reapplies commits onto a new base, effectively rewriting history. Question 6. In a CI pipeline, which stage is most appropriate for running static application security testing (SAST)? A) After deployment to production B) During the build step before unit tests C) After integration tests but before packaging D) During the release approval step Answer: C Explanation: SAST should run after the code compiles and unit tests pass, but before artifacts are packaged, ensuring security issues are caught early.
B) Rebooting the servers after applying updates C) Replacing the entire server with a new image containing the updates D) Using hot‑swap memory upgrades Answer: C Explanation: Immutable infrastructure replaces the whole instance with a freshly built image rather than modifying the running one. Question 11. Which Dockerfile instruction creates a new layer that caches the result of installing system packages? A) COPY B) RUN apt‑get install … C) ENTRYPOINT D) CMD Answer: B Explanation: Each RUN creates a new layer; installing packages with RUN allows Docker to cache that step. Question 12. What is the purpose of a “docker‑compose.yml” file? A) To define a single container image build process B) To orchestrate multiple containers as a single application stack C) To manage Docker registry authentication D) To monitor container resource usage Answer: B Explanation: Docker Compose defines services, networks, and volumes for multi‑container applications. Question 13. In Kubernetes, which object ensures that a specified number of pod replicas are always running? A) Service B) Deployment C) ConfigMap
D) PersistentVolume Answer: B Explanation: A Deployment manages replica sets and ensures the desired number of pods are active. Question 14. Which Kubernetes resource type is best suited for exposing a set of pods to external traffic via a load balancer? A) Ingress B) Service of type LoadBalancer C) ConfigMap D) StatefulSet Answer: B Explanation: A Service with type LoadBalancer provisions an external load balancer that routes traffic to the pods. Question 15. What is a “canary release” primarily designed to achieve? A) Immediate full traffic shift to a new version B) Gradual exposure of a new version to a small subset of users for risk mitigation C) Deploying code without any testing D) Rolling back automatically after a fixed time interval Answer: B Explanation: Canary releases limit exposure, allowing detection of issues before full rollout. Question 16. In a blue‑green deployment, what is the main benefit of keeping both environments running simultaneously? A) Reduces the number of servers needed B) Allows instant rollback by switching traffic back to the previous environment C) Eliminates the need for a load balancer D) Removes the need for database migrations Answer: B
Question 20. Which tool is commonly used for secret management in Kubernetes clusters? A) Helm B) Vault C) Prometheus D) Istio Answer: B Explanation: HashiCorp Vault provides secure storage and dynamic retrieval of secrets for Kubernetes workloads. Question 21. In the context of microservices, what is the primary purpose of a Service Mesh? A) To store microservice data persistently B) To manage inter‑service communication, observability, and security without code changes C) To compile microservices into a monolithic binary D) To replace container orchestration platforms Answer: B Explanation: A Service Mesh (e.g., Istio) handles traffic routing, retries, encryption, and telemetry at the network layer. Question 22. Which of the following API communication styles typically provides the best performance for inter‑service calls in a high‑throughput environment? A) REST over HTTP/1. B) SOAP over HTTPS C) gRPC over HTTP/ D) XML‑RPC Answer: C Explanation: gRPC uses HTTP/2, binary serialization, and multiplexed streams, offering lower latency and higher throughput. Question 23. What is the main advantage of using “Feature Flags” in a CI/CD workflow? A) They replace the need for automated testing
B) They allow toggling functionality without redeploying code C) They enforce strict version control policies D) They automatically generate documentation Answer: B Explanation: Feature flags enable runtime control of features, facilitating gradual rollouts and quick rollbacks. Question 24. Which of the following is a key principle of Lean as applied to DevOps? A) Maximizing work‑in‑progress (WIP) to increase utilization B) Eliminating waste and focusing on value‑stream flow C) Prioritizing individual heroics over collaboration D) Using heavy, monolithic architectures for stability Answer: B Explanation: Lean emphasizes waste reduction and optimizing the value stream, aligning with DevOps goals. Question 25. In a CI environment, which of the following is the most appropriate use of a “pipeline as code” approach? A) Writing shell scripts manually on each developer’s laptop B) Defining the entire build, test, and deploy workflow in a version‑controlled YAML file C) Hard‑coding credentials inside the pipeline definition D) Using a GUI to drag‑and‑drop pipeline steps without version control Answer: B Explanation: Pipeline‑as‑code stores the workflow definition in source control, enabling reproducibility and review. Question 26. Which metric best indicates the speed at which an organization can recover from a production incident? A) Lead time for changes B) Change failure rate
Question 30. In the context of compliance as code, which tool can automatically check AWS resources against CIS Benchmarks? A) Terraform B) Chef InSpec C) Docker Compose D) SonarQube Answer: B Explanation: Chef InSpec provides compliance profiles that can be executed against cloud resources. Question 31. Which of the following is an advantage of using “Trunk‑Based Development” for continuous delivery? A) Longer feature branches reduce integration effort B) Frequent merges keep the main branch always releasable C) It eliminates the need for automated testing D) It allows developers to work offline indefinitely Answer: B Explanation: By merging continuously, the trunk remains in a deployable state. Question 32. What does the “GitOps” methodology primarily rely on for managing infrastructure? A) Manual SSH commands to provision servers B) Storing declarative infrastructure definitions in Git and using agents to apply them C) Directly editing cloud console settings D) Using proprietary vendor APIs without version control Answer: B Explanation: GitOps treats Git as the single source of truth and employs controllers to reconcile state. Question 33. Which of the following statements about “Canary Deployments” is true? A) They require 100% of traffic to be switched instantly.
B) They are only applicable to serverless functions. C) They typically use weighted routing to send a fraction of traffic to the new version. D) They eliminate the need for monitoring. Answer: C Explanation: Canary releases use traffic weighting (e.g., 5% to new version) to monitor behavior before full rollout. Question 34. Which of these is a common practice to ensure “environment consistency” between local development and production? A) Using different operating systems for each environment B) Hard‑coding absolute file paths in the codebase C) Containerizing the application with Docker and using the same image everywhere D) Relying on manual configuration files per environment Answer: C Explanation: Docker images guarantee that the same runtime environment runs everywhere. Question 35. In a CI pipeline, which step should be executed before running unit tests? A) Deploy to production B) Code linting and static analysis C) Integration testing against a live database D) Security scanning of container images Answer: B Explanation: Linting and static analysis catch syntax/style issues early, before unit tests run. Question 36. Which of the following is a primary benefit of using “Infrastructure as Code” (IaC) for scaling applications? A) Manual scaling becomes faster B) Scaling decisions are made by a single developer at a time C) Automated, repeatable provisioning of resources enables rapid scaling
Question 40. Which of the following is NOT a typical characteristic of a “microservice”? A) Independently deployable B) Shared database schema across all services C) Small, focused business capability D) Owns its data storage Answer: B Explanation: Microservices favor decentralized data stores to avoid tight coupling. Question 41. Which CI/CD tool uses a “.gitlab-ci.yml” file to describe pipeline stages? A) Jenkins B) Travis CI C) GitLab CI/CD D) CircleCI Answer: C Explanation: GitLab CI reads the .gitlab-ci.yml file from the repository to define jobs. Question 42. What is the primary purpose of a “Quality Gate” in SonarQube? A) To block merges when code does not meet predefined quality thresholds B) To automatically deploy code to production C) To encrypt source code before analysis D) To generate UI mockups for developers Answer: A Explanation: Quality Gates enforce standards (e.g., no new bugs) before code can progress. Question 43. Which of the following is an example of a “non‑functional” requirement that can be validated via performance testing? A) User login functionality B) Data validation logic
C) Response time under load D) API endpoint naming conventions Answer: C Explanation: Performance testing assesses response time, throughput, and other non‑functional criteria. Question 44. In the context of “Observability,” what does the “Three Pillars” refer to? A) Logging, Monitoring, Alerting B) Metrics, Traces, Logs C) CI, CD, IaC D) Code, Config, Container Answer: B Explanation: Observability is built on metrics, distributed traces, and logs. Question 45. Which of the following tools is specifically designed for chaos testing in Kubernetes? A) Prometheus B) Istio C) LitmusChaos D) Helm Answer: C Explanation: LitmusChaos provides experiments to inject failures into Kubernetes clusters. Question 46. Which of the following best describes “A/B testing” in hypothesis‑driven development? A) Deploying two completely unrelated applications simultaneously B) Serving two variants of a feature to different user groups to compare outcomes C) Running integration tests in parallel with unit tests D) Using two separate code repositories for the same project Answer: B Explanation: A/B testing measures the impact of variations by exposing them to distinct user cohorts.
Question 50. In a DevSecOps pipeline, which stage is most appropriate for performing “dependency scanning”? A) After deployment to production B) During the build phase after code compilation C) During the planning phase before any code is written D) Only during manual code reviews Answer: B Explanation: Dependency scanning runs after the build resolves all libraries, ensuring known vulnerabilities are identified before packaging. Question 51. Which of the following is a primary benefit of using “Git hooks” in a CI workflow? A) They replace the need for a CI server. B) They allow automatic execution of scripts (e.g., linting) on local commits or pushes. C) They automatically generate documentation. D) They encrypt the repository. Answer: B Explanation: Git hooks trigger scripts on events such as pre‑commit or pre‑push, enforcing quality checks early. Question 52. Which metric is most directly impacted by increasing the frequency of small, incremental deployments? A) Change failure rate B) Mean time to recover (MTTR) C) Deployment frequency D) Lead time for changes Answer: C Explanation: More frequent small deployments raise the deployment frequency metric. Question 53. In Kubernetes, what is the purpose of a “Horizontal Pod Autoscaler” (HPA)? A) To scale the number of nodes in the cluster automatically
B) To adjust the number of pod replicas based on observed CPU/memory usage or custom metrics C) To backup pod data to persistent storage D) To enforce network policies across namespaces Answer: B Explanation: HPA monitors metrics and scales pod replicas up or down accordingly. Question 54. Which of the following tools is primarily used for log aggregation and search in the ELK stack? A) Logstash B) Elasticsearch C) Kibana D) Beats Answer: B Explanation: Elasticsearch stores and indexes logs, enabling fast search queries. Question 55. What is the main purpose of “Terraform State” files? A) To store compiled binaries for deployment B) To keep track of the real‑world resources that Terraform manages, enabling incremental updates C) To hold user passwords for cloud providers D) To define Docker container networking Answer: B Explanation: The state file records resource IDs and attributes, allowing Terraform to detect drift and apply changes safely. Question 56. Which of the following best illustrates “Continuous Feedback” in the DevOps lifecycle? A) Developers writing code without any testing B) Automated alerts from monitoring tools sent back to developers after a production incident C) Manual sign‑off before each release D) Quarterly performance reviews of the engineering team
Explanation: Release managers focus on coordination and governance, not on writing application code. Question 60. What does “Idempotent” mean in the context of configuration management tools like Ansible? A) The tool can only run once per server B) Running the same playbook multiple times results in the same system state without side effects C) The tool automatically scales resources based on load D) The configuration files are encrypted by default Answer: B Explanation: Idempotence guarantees that repeated executions converge to the desired state without unintended changes. Question 61. Which of the following best describes a “Service Level Objective” (SLO) in a DevOps context? A) A contractual agreement between two companies B) A target value for a specific service metric (e.g., 99.9% availability) that guides operational decisions C) The total number of services a team owns D) The amount of code written per sprint Answer: B Explanation: SLOs define measurable performance goals that help assess service health. Question 62. Which of the following is an advantage of using “Helm” in Kubernetes? A) It provides a built-in CI server. B) It enables templated, versioned packaging of Kubernetes resources (charts). C) It replaces Docker as a container runtime. D) It automatically writes unit tests for applications. Answer: B Explanation: Helm charts package Kubernetes manifests with templating, facilitating reuse and versioning.
Question 63. Which of the following is a common pattern for handling database schema migrations in a CI/CD pipeline? A) Manually editing the production database during a release window B) Using migration tools (e.g., Flyway, Liquibase) that run automatically as part of the deployment step C) Ignoring schema changes and relying on ORM auto‑generation at runtime D) Storing schema scripts in a separate, non‑versioned repository Answer: B Explanation: Automated migration tools apply versioned schema changes consistently across environments. Question 64. In the context of “Shift‑Left Security,” which of the following activities should occur earliest in the software lifecycle? A) Penetration testing in production B) Security requirements definition during planning C) Incident response planning after a breach D) Manual code review after release Answer: B Explanation: Defining security requirements early ensures that security considerations shape design and implementation. Question 65. Which of the following best explains why “Feature Toggles” are useful for continuous delivery? A) They eliminate the need for automated testing. B) They allow incomplete features to be merged and deployed safely, hidden from users until ready. C) They replace the need for version control. D) They automatically generate documentation. Answer: B Explanation: Feature toggles decouple deployment from release, enabling safe delivery of incomplete work.