DevOps Fundamentals for CompTIA Cloud+
This page covers the DevOps Fundamentals domain of the CompTIA Cloud+ certification. Master Cybersecurity offers 28 practice questions in this domain, drawn from the same content we use across our timed exam simulations. Below are five sample questions with full answer explanations.
Sample Practice Questions
Question 1
A group of cloud administrators frequently uses the same deployment template to recreate a cloud-based development environment. The administrators are unable to go back and review the history of changes they have made to the template. Which of the following cloud resource deployment concepts should the administrator start using?- A. Drift detection
- B. Repeatability
- C. Documentation
- D. Versioning
Explanation
The correct answer is: D. Versioning.
Versioning is the concept of recording each change to a deployment template in a tracked history, so administrators can review who changed what and when, compare prior revisions, and roll back to any earlier state if a deployment misbehaves. Storing templates in a version-controlled repository like Git is the standard implementation. Drift detection compares the deployed live state to the template to flag manual changes, but it does not retain a history of template edits themselves. Repeatability is the property that running the same template produces the same environment; it speaks to determinism, not to change history. Documentation is unstructured human-written context and does not provide a reliable diff-able timeline of code changes. Versioning is the concept that directly answers the need to review template change history.
Question 2
A cloud architect attempts to modify a protected branch but is unable to do so. The architect receives an error indicating the action cannot be completed. Which of the following should the architect try instead?- A. Adding a new remote
- B. Creating a pull request
- C. Merging the branch
- D. Rebasing the branch
Explanation
The correct answer is: B. Creating a pull request.
Protected branches block direct writes precisely so that changes flow through a review gate. The correct path forward is to create a pull request from a feature branch into the protected branch, which triggers peer review, status checks, and any required approvals before the merge is allowed. This is the standard collaborative workflow for protected branches. Adding a new remote points the repository at a different server but does nothing to bypass the protection rules on the original branch and is unrelated to the merge problem. Merging the branch is exactly what the protection rule is blocking, so retrying the same operation will fail again. Rebasing the branch only rewrites local commit history relative to its base; it still cannot push that history directly into a protected branch. A pull request is the sanctioned mechanism for getting changes into a protected branch.
Question 3
An engineer made a change to an application and needs to select a deployment strategy that meets the following requirements: Is simple and fast - Can be performed on two identical platforms Which of the following strategies should the engineer use?- A. Blue-green
- B. Canary
- C. Rolling
- D. In-place
Explanation
The correct answer is: A. Blue-green.
Blue-green is defined by maintaining two identical production-grade environments, one live (blue) and one idle or freshly built (green), and cutting traffic from one to the other when the new version is ready. That structure satisfies the requirement of two identical platforms and keeps the switchover simple and fast because traffic is shifted at the load balancer rather than rolled across nodes. Canary releases the new version to a small subset of users first and gradually widens the audience, so it is intentionally slower and does not require two identical platforms. Rolling updates the existing fleet in batches and likewise does not run on two identical environments. In-place applies the update directly to the running nodes, which is fast but operates on a single environment rather than two identical platforms and carries higher rollback risk. Blue-green is the right match for the two-platform, fast-switchover requirement.
Question 4
A cloud solutions architect needs to have consistency between production, staging, and development environments. Which of the following options will best achieve this goal?- A. Using Terraform templates with environment variables
- B. Using Grafana in each environment
- C. Using the ELK stack in each environment
- D. Using Jenkins agents in different environments
Explanation
The correct answer is: A. Using Terraform templates with environment variables.
Terraform is a declarative infrastructure-as-code tool that provisions resources from versioned template files, and parameterizing those templates with environment variables allows the same code to spin up production, staging, and development with only their size, naming, or credential values differing. That shared codebase enforces structural consistency across environments and eliminates configuration drift introduced by manual changes. Grafana is a visualization layer for metrics dashboards, so it observes environments rather than building them. The ELK stack (Elasticsearch, Logstash, Kibana) centralizes logs for analysis and similarly does not provision infrastructure. Jenkins agents are CI/CD build executors that can run deployment jobs, but on their own they do not define infrastructure; they would still need a templating tool like Terraform to enforce consistency. Templated IaC is the durable way to keep environments aligned.
Question 5
A company uses containers to implement a web application. The development team completed internal testing of a new feature and is ready to move the feature to the production environment. Which of the following deployment models would best meet the company’s needs while minimizing cost and targeting a specific subset of its users?- A. Canary
- B. Blue-green
- C. Rolling
- D. In-place
Explanation
The correct answer is: A. Canary.
A canary deployment exposes the new feature to a small, targeted subset of users first, observes its behavior, and only expands the audience after validation, which directly matches the requirement to target a specific subset of users. Because canary reuses the existing production fleet and only deploys the new build to a small portion of containers rather than provisioning a full parallel environment, it is also cost-efficient. Blue-green requires standing up a full duplicate environment to swap traffic, doubling infrastructure cost and exposing all users at the cutover rather than a targeted slice. Rolling updates the entire fleet in batches and serves all users from the new build progressively, so it does not target a specific subset. In-place updates the existing nodes for everyone at once and offers no targeting at all. Canary is the cost-efficient, subset-targeting choice.
Other CompTIA Cloud+ domains
- Cloud Architecture (46 questions)
- Deployment (46 questions)
- Operations (53 questions)
- Security (44 questions)
- Troubleshooting (43 questions)