DevOps — 275 questions
Play ▸- #1 · What does this command do? docker build -t myapp .
- #2 · What does 'docker ps' show? docker ps
- #3 · What does the -d flag do here? docker run -d -p 8080:80 nginx
- #4 · A Dockerfile is?
- #5 · What is Docker Compose for? docker compose up
- #6 · A Docker image is?
- #7 · What does this command do? docker exec -it web bash
- #8 · A container differs from a VM because it?
- #9 · Kubernetes is?
- #10 · The smallest deployable unit in Kubernetes is a?
- #11 · What does this command do? kubectl get pods
- #12 · What does this command do? kubectl apply -f deploy.yaml
- #13 · A Kubernetes Service provides?
- #14 · A Kubernetes Deployment manages?
- #15 · A worker machine in a Kubernetes cluster is a?
- #16 · Helm is?
- #17 · A rolling update in Kubernetes?
- #18 · CI/CD stands for?
- #19 · A GitHub Actions workflow is defined in?
- #20 · Jenkins is?
- #21 · GitLab CI is configured in which file?
- #22 · 'Continuous Deployment' means?
- #23 · A blue-green deployment is?
- #24 · Terraform is used for?
- #25 · What does 'terraform apply' do? terraform apply
- #26 · Ansible playbooks are written in?
- #27 · Ansible is agentless and connects mainly over?
- #28 · 'Infrastructure as Code' means?
- #29 · Terraform 'state' tracks?
- #30 · Which AWS service provides object storage?
- #31 · AWS EC2 provides?
- #32 · Prometheus is mainly used for?
- #33 · Grafana is used to?
- #34 · What does 'git rebase' do? git rebase main
- #35 · What does git cherry-pick do? git cherry-pick a1b2c3
- #36 · What is systemctl used for? systemctl restart nginx
- #37 · A '.dockerignore' file is used to?
- #38 · Which tool is a service mesh for Kubernetes?
- #39 · What does docker ps -a show? docker ps -a
- #40 · What does docker logs -f web do? docker logs -f web
- #41 · What does the -d flag do here? docker compose up -d
- #42 · What does kubectl get pods list? kubectl get pods
- #43 · What does this command do? kubectl scale deployment web --replicas=5
- #44 · What is a Kubernetes Service used for?
- #45 · What does a liveness probe do in Kubernetes?
- #46 · What does CI stand for in DevOps?
- #47 · What is the main purpose of a CI pipeline?
- #48 · What does this command print? terraform output
- #49 · What does terraform plan show? terraform plan
- #50 · What is the main benefit of autoscaling?
- #51 · What does "serverless" mean?
- #52 · What does this command list? docker images
- #54 · What usually happens after this? kubectl delete pod web
- #55 · What is a Pod in Kubernetes?
- #56 · What does this command do? kubectl scale deployment web --replicas=3
- #57 · What does Continuous Integration (CI) mean?
- #58 · In a pipeline, what is a rollback?
- #60 · What does this command do? terraform init
- #61 · What does a load balancer do?
- #63 · What does a headless Service give you?
- #64 · What is autoscaling?
- #65 · What does "idempotent" mean for IaC?
- #66 · What does a Dockerfile FROM line set? FROM node:20-alpine
- #67 · What does this command show? kubectl logs mypod
- #68 · What does a CDN primarily do?
- #69 · What does this command produce? docker build -t app:1.0 .
- #70 · What does -p 8080:80 do? docker run -d -p 8080:80 nginx
- #71 · What does this do? docker exec -it web sh
- #72 · How does stop differ from kill? docker stop web
- #73 · What does --from=builder do in a Dockerfile? COPY --from=builder /app/bin /usr/local/bin
- #74 · What does -n prod mean? kubectl get pods -n prod
- #75 · What does this command do? kubectl rollout undo deployment/api
- #76 · What is the result? kubectl scale deployment api --replicas=5
- #77 · What is this most useful for? kubectl describe pod api-0
- #78 · What does a readiness probe control?
- #79 · When does this GitHub Actions workflow run? on: pull_request:
- #80 · What does this job-level key express? needs: [build]
- #81 · Why do CI pipelines publish build artifacts?
- #82 · Why pin dependency versions in CI?
- #83 · What does a canary release do?
- #84 · What does this command check? terraform validate
- #85 · What does this print? terraform state list
- #86 · What makes infrastructure code idempotent?
- #87 · What does -i hosts specify? ansible-playbook -i hosts site.yml
- #88 · What is horizontal scaling?
- #89 · What does a load balancer health check achieve?
- #90 · What is object storage best suited for?
- #91 · What does autoscaling normally react to?
- #92 · What is a blue/green deployment?
- #93 · What does a Docker volume provide? docker volume create data
- #94 · What is a Kubernetes namespace for?
- #95 · What is a build artifact?
- #96 · What does 'declarative' configuration mean?
- #97 · What is a container registry?
- #98 · What does this command do? docker pull nginx
- #99 · What does a ConfigMap store?
- #100 · Why run automated tests in a CI pipeline?
- #101 · What does 'high availability' aim for?
- #102 · What does this command do? terraform destroy
- #103 · Why choose an -alpine base image? FROM node:20-alpine
- #104 · When does this CI workflow trigger? on: push: branches: [main]
- #105 · What does 'docker build' produce? docker build -t app . && docker run app
- #106 · What does a Terraform workspace isolate? terraform workspace list
- #107 · What does replicas: 3 request? kind: Deployment replicas: 3
- #108 · Why prefer 'npm ci' in pipelines? npm ci && npm test
- #109 · Which tool commonly stores time-series metrics? // dashboards of request latency over time
- #110 · Why copy package files before the full source? COPY . . RUN npm install
- #111 · What deployment strategy is this? // shift 5% of traffic to the new version
- #112 · Which tool uses this YAML task format? - name: install nginx apt: name=nginx state=presen
- #114 · What do pipeline stages define? stages: [build, test, deploy]
- #115 · Why reference a secret this way? DB_PASSWORD=${{ secrets.DB_PASSWORD }}
- #116 · What does this command show? kubectl logs my-pod
- #117 · Which strategy swaps two identical environments? // keep old version live until new is ready
- #118 · What does EXPOSE document? EXPOSE 8080
- #119 · What does a liveness probe decide? livenessProbe: httpGet: path: /healthz
- #120 · What is the risk of -auto-approve? terraform apply -auto-approve
- #121 · What are build artifacts? artifacts: paths: [dist/]
- #122 · What does a ClusterIP Service provide? kind: Service type: ClusterIP
- #123 · What does an Ingress handle? kind: Ingress rules: - host: api.example.com
- #124 · What does a StatefulSet guarantee? kind: StatefulSet
- #125 · What does a DaemonSet schedule? kind: DaemonSet
- #126 · How does a Secret differ from a ConfigMap? kind: Secret type: Opaque
- #127 · What happens if the pod exceeds this? resources: limits: memory: 512Mi
- #128 · What does this adjust? kind: HorizontalPodAutoscaler targetCPUUtilization
- #129 · What is this searching for? git bisect start git bisect bad git bisect good v1
- #130 · What does this do? git revert a1b2c3
- #131 · What does this produce? strategy: matrix: node: [18, 20, 22]
- #132 · Why add this step? - uses: actions/cache@v4 with: path: ~/.npm
- #133 · What does a feature flag allow? if (flags.newCheckout) { renderNew(); }
- #134 · What does the error budget represent? SLO: 99.9% over 30 days
- #135 · What does distributed tracing show? trace_id=4bf92f span_id=00f067
- #136 · What does structured logging make easier? {"level":"warn","user":42,"ms":310}
- #137 · What is a Terraform module? module "vpc" { source = "./modules/vpc" }
- #138 · What does this command do? terraform fmt
- #139 · What does this reclaim? docker system prune
- #140 · Why pin a digest instead of a tag? FROM node@sha256:9b1c...
- #141 · What does least privilege mean for an IAM role?
- #142 · What does immutable infrastructure mean?
- #143 · Why copy the manifest first? COPY package.json . RUN npm ci COPY . .
- #144 · What does .dockerignore affect?
- #145 · What is a multi-stage build for?
- #146 · Why run a container as non-root?
- #147 · Where should container logs go?
- #148 · What does a Deployment manage?
- #149 · What does a Service give a set of pods?
- #150 · What is a namespace for?
- #151 · Why pin action and image versions?
- #152 · What should a pipeline do on a failed test?
- #153 · What does
terraform plan produce?
- #154 · Why keep Terraform state remote?
- #155 · What is a metric best for?
- #156 · Why not bake secrets into an image?
- #157 · What happens when a readiness probe fails?
- #158 · What does a liveness probe failure trigger?
- #159 · What does a resource request influence?
- #160 · What does exceeding a memory limit cause?
- #161 · What is a StatefulSet for?
- #162 · What does a PodDisruptionBudget protect?
- #163 · What does an Ingress route on?
- #164 · Why does image size matter in CI?
- #165 · What does a bind mount expose?
- #166 · What is a blue-green deployment?
- #167 · What does a canary release limit?
- #168 · Why separate build from deploy?
- #169 · What does
terraform import do?
- #170 · Why is drift a problem?
- #171 · What does an availability zone isolate?
- #172 · Why prefer a role over static keys?
- #173 · Why alert on symptoms, not causes?
- #174 · Why report p99 rather than the mean?
- #175 · What links spans into one trace?
- #176 · What must a rolling update preserve?
- #177 · What does an error budget quantify?
- #178 · Why add jitter to retries?
- #179 · Why are Kubernetes Secrets not encrypted by default?
- #180 · What does a taint on a node do?
- #181 · Why can CPU limits hurt latency?
- #182 · Why does a pod stay Pending?
- #183 · Why is a shared mutable cache risky in CI?
- #184 · Why not run untrusted PR builds with secrets?
- #185 · Why does state locking matter?
- #186 · What does a circuit breaker prevent?
- #187 · Why deploy schema changes before code?
- #188 · What does a Dockerfile CMD define?
- #189 · Why order Dockerfile layers by change rate?
- #190 · What does kubectl apply do with a manifest?
- #191 · What does a CI cache speed up?
- #192 · Why sample traces or logs?
- #193 · What does a CPU request affect?
- #194 · What does kubectl drain do to a node?
- #195 · What does an init container do?
- #196 · What does terraform plan produce?
- #197 · Why lock the Terraform state file?
- #198 · What does a canary deployment do?
- #199 · Why inject secrets at runtime?
- #200 · What does an autoscaling group replace?
- #201 · What is a service level indicator (SLI)?
- #202 · What does a pod disruption budget limit?
- #203 · Why keep deployments backward compatible?
- #204 · What does a trace span record?
- #205 · What is trunk-based development?
- #206 · What is a cloud spot instance?
- #207 · What does this command do? kubectl port-forward pod/web 8080:80
- #208 · What does MTTR usually measure?
- #209 · What does the restart policy do here? docker run -d --restart unless-stopped nginx
- #210 · In GitOps, what normally triggers a deploy?
- #211 · What does a CrashLoopBackOff status mean?
- #212 · What does a Helm chart's values.yaml hold?
- #213 · Where does Kubernetes keep its cluster state?
- #214 · When does an Ansible handler run?
- #215 · Why give a private subnet a NAT gateway?
- #216 · How does an SLA differ from an SLO?
- #217 · What is OpenTelemetry?
- #218 · What does this workflow setting do? concurrency: group: deploy-${{ github.ref }} cance
- #219 · What role does CMD play here? ENTRYPOINT ["python", "app.py"] CMD ["--port", "80
- #220 · How does a Role differ from a ClusterRole?
- #221 · Why might docker stop wait for the full timeout here? CMD npm start
- #222 · Which kernel feature enforces a container's memory limit?
- #223 · Why prefer for_each over count for a set of buckets?
- #224 · What does this change when a resource must be replaced? lifecycle { create_before_destroy = true }
- #225 · What is a startupProbe mainly for?
- #226 · If no NetworkPolicy selects a pod, what traffic may reach it?
- #227 · Why avoid user IDs as Prometheus labels?
- #228 · What is the main benefit of dynamic secrets, as in Vault?
- #229 · What does depends_on guarantee here by default? services: web: depends_on: - db
- #230 · In semantic versioning, what does a bump from 2.4.1 to 3.0.0 signal?
- #231 · In SRE terms, what is "toil"?
- #232 · What does --rm do here? docker run --rm alpine echo hi
- #233 · What does a Kubernetes CronJob do?
- #234 · When does this workflow trigger? on: workflow_dispatch:
- #235 · What is the aim of a blameless postmortem?
- #236 · What does a Kustomize overlay do?
- #237 · What is HashiCorp Packer used for?
- #238 · What does chaos engineering do?
- #239 · Which of these is one of the four DORA metrics?
- #240 · What is left out of a distroless base image?
- #241 · What does this instruction add to the container? HEALTHCHECK --interval=30s \ CMD curl -f http://lo
- #242 · What does a Service of type LoadBalancer add?
- #243 · What does this block do? data "aws_ami" "ubuntu" { most_recent = true owner
- #244 · What does -replace do here? terraform apply -replace="aws_instance.web"
- #245 · How does ARG differ from ENV in a Dockerfile?
- #246 · Which QoS class does a pod get if every container looks like this? resources: requests: { cpu: 500m, memory: 256Mi }
- #247 · What does this block prevent on the next apply? moved { from = aws_instance.web to = aws_instance.
- #248 · How does Grafana Loki keep log storage cheap?
- #249 · What do Argo CD sync waves control?
- #250 · What does this rule mean for app=web replicas? podAntiAffinity: requiredDuringSchedulingIgnoredDu
- #251 · Which versions does this constraint allow? required_providers { aws = { source = "hashicorp/a
- #252 · In the USE method, what does the S stand for?
- #253 · What does an SLO burn-rate alert fire on?
- #254 · Why use OIDC federation from a CI job to a cloud provider?
- #255 · When will the kubelet pull this image? containers: - name: api image: registry.example.co
- #256 · During a rollout, what is the most pods this Deployment can have at once? replicas: 4 strategy: type: RollingUpdate rollingU
- #257 · What does the ReadWriteOnce access mode mean? kind: PersistentVolumeClaim spec: accessModes: [Re
- #258 · What does looking up the name db return in the cluster? kind: Service metadata: { name: db } spec: type: E
- #259 · What does applying a CustomResourceDefinition (CRD) give a cluster?
- #260 · What can a mutating admission webhook do that a validating one cannot?
- #261 · A pod in this namespace asks to run as root. What happens? kind: Namespace metadata: name: payments labels: p
- #262 · What happens to the pods already running on node-2? kubectl cordon node-2
- #263 · What Name tags do the three instances get? resource "aws_instance" "web" { count = 3 tags = {
- #264 · Someone edits this resource's tags in the cloud console. What does the next plan do? lifecycle { ignore_changes = [tags] }
- #265 · Why save the plan to a file before applying it? terraform plan -out=tfplan terraform apply tfplan
- #266 · What does the -/+ marker in this plan mean? -/+ resource "aws_instance" "web" { ~ ami = "ami-0
- #267 · What does become: true do for this Ansible task? - name: restart sshd service: name=sshd state=rest
- #268 · Where can this output's value still be read in plain text? output "db_password" { value = random_password.db.
- #269 · What does --chown do in this instruction? COPY --chown=app:app . /app
- #270 · When does docker compose up start the adminer service? services: api: image: api adminer: image: adminer
- #271 · Why is splitting these into two RUN lines a problem? RUN apt-get update RUN apt-get install -y curl
- #272 · When does this GitHub Actions step run? - name: Upload test logs if: always() uses: action
- #273 · With this key, what makes the job save a fresh cache entry? - uses: actions/cache@v4 with: path: ~/.npm key: n
- #274 · What can the production environment's protection rules require before this job runs? deploy: runs-on: ubuntu-latest environment: produc
- #275 · When does this workflow run? on: push: paths: - 'services/api/**'
- #276 · What does a merge queue test before it merges a pull request?
- #277 · What does this Sigstore cosign command produce? cosign sign registry.example.com/api@sha256:4f1c..
- #278 · What does this PromQL expression return for each series? rate(http_requests_total[5m])
- #279 · What does this query estimate? histogram_quantile(0.95, sum by (le) (rate(req_dur