
DevOps interviews now expect you to know three things about the cloud: how infrastructure is planned, how it is created from code, and how you keep an eye on it once it runs. This fourth set covers cloud service models and availability, autoscaling and storage, Terraform and Infrastructure as Code, and then monitoring, logging, alerting and secrets.
How to practise: read each question and tap the option you think is correct. You will see right away whether you got it, along with a short explanation, and your score is tracked at the bottom of the screen. This set has 15 questions.
Topics covered in this set
- IaaS, PaaS and SaaS
- Regions, availability zones and autoscaling
- Object, block and file storage
- Infrastructure as Code and Terraform state
- Prometheus, Grafana, alerting and ELK
- Secrets management and 12-factor config
DevOps MCQs with answers and explanations
Q1. A team deploys code to a platform that handles servers, OS patching and scaling, and they manage only the application and its data. Which cloud service model is this?
a) SaaS
b) On-premises
c) PaaS
d) IaaS
Q2. Why are production instances usually spread across at least two availability zones in one region?
a) Each AZ is an isolated data centre group with separate power and networking, so the app survives the failure of one AZ
b) It lowers latency to users in other continents
c) AZs give each instance a free public IP
d) It is required for using object storage
Q3. An autoscaling group has min 2, desired 4 and max 10 instances. One instance fails its health check. What does the group do?
a) Terminates all instances and starts again
b) Raises max capacity to 11
c) Terminates the unhealthy instance and launches a replacement to return to 4
d) Reduces desired capacity to 3
Q4. Which workload fits object storage such as Amazon S3 better than a block storage volume?
a) The boot disk of a virtual machine
b) The data files of a running PostgreSQL database
c) Storing user-uploaded images and backups accessed over HTTP by key
d) A swap partition
Q5. What is the main benefit of Infrastructure as Code?
a) Infrastructure is defined in version-controlled files, so it can be reviewed, repeated across environments and recreated reliably
b) It removes the need for a cloud provider
c) It makes manual console changes faster
d) Servers no longer need operating systems
Q6. What does terraform plan do?
a) Creates all resources immediately
b) Downloads provider plugins only
c) Shows the changes Terraform would make to reach the configuration, by comparing it with the state and real resources, without changing anything
d) Deletes the state file
Q7. Why do teams store Terraform state in a remote backend such as S3 with locking instead of a local terraform.tfstate file?
a) Local state cannot hold more than ten resources
b) So all team members and CI share one state, and locking stops two applies from changing it at the same time
c) Remote state makes Terraform run faster
d) Remote state removes the need for providers
Q8. A resource was changed by hand in the cloud console after Terraform created it. What will the next terraform plan usually show?
a) The drift, with a proposed change to bring the resource back to what the configuration says
b) An error that stops all future runs
c) Nothing, because Terraform ignores manual changes
d) A new copy of the state file
Q9. What is immutable infrastructure?
a) Infrastructure that is written in read-only files
b) Using only physical servers
c) Servers are never patched in place; a new image is built and new servers replace the old ones for every change
d) Servers that cannot be deleted
Q10. How does Prometheus usually collect metrics from applications?
a) Applications push log files to Prometheus over FTP
b) Grafana sends metrics to Prometheus
c) Prometheus scrapes an HTTP /metrics endpoint on each target at a regular interval
d) Prometheus reads the application database directly
Q11. Which Prometheus metric type should be used for the total number of HTTP requests served?
a) Summary only
b) Gauge
c) Counter
d) Histogram only
Q12. Which alert is generally considered the most useful to page an on-call engineer?
a) A user-facing symptom, such as the error rate staying above the agreed SLO for several minutes
b) Disk usage changed by 1%
c) CPU above 70% on one server for 10 seconds
d) Any single error log line
Q13. In the ELK stack, what are the roles of Elasticsearch, Logstash and Kibana?
a) Elasticsearch draws dashboards, Logstash stores logs, Kibana collects them
b) Kibana stores logs and Logstash searches them
c) Elasticsearch stores and indexes logs, Logstash collects and transforms them, Kibana is the UI for searching and visualising them
d) All three are databases
Q14. What is the recommended way to give a production app its database password?
a) Store it in a secrets manager such as HashiCorp Vault or a cloud secrets service and inject it at runtime with access controls
b) Commit it in the repository in a config file
c) Put it in the application logs at startup
d) Bake it into the Docker image at build time
Q15. According to the twelve-factor app methodology, where should configuration that differs between deployments, such as database URLs, be kept?
a) In constants inside the source code
b) In a separate branch for each environment
c) In the README file
d) In environment variables, separate from the code
Quick revision notes
- IaaS: you manage the OS and everything above it. PaaS: you manage only the app. SaaS: you just use the app.
- Spread across AZs for resilience; an autoscaling group keeps desired capacity between min and max.
- Object storage for files by key over HTTP; block storage as a disk for databases and VMs.
- Terraform: init → plan → apply; keep state remote, locked and encrypted; plan shows drift.
- Prometheus pulls /metrics; counters only rise, gauges go up and down; alert on user-facing symptoms.
Frequently asked questions
Do I need cloud certifications for a DevOps job?
They help show that you have studied things properly. But interviews mostly check whether you really understand networking, compute, storage and IAM, and how you would design and automate a real system.
Should I learn Terraform or CloudFormation?
Start with Terraform. It works with many cloud providers and a lot of companies use it. CloudFormation and CDK are common in teams that use only AWS.
What are the three pillars of observability?
Metrics, logs and traces. Metrics show trends and trigger alerts. Logs give the details of single events. Traces follow one request as it moves across services.
Comments
Post a Comment