Devops
294 bites tagged Devops — interview questions with model answers, and 60-second explainers.
Define configuration drift in IaC. How do you detect and remediate it?
This tests state divergence between declared and live infrastructure. A strong answer defines drift as deviation from the IaC source of truth, proposes automated scanning for detection, and recommends reconciliation or redeployment.
Design a CI/CD pipeline for ephemeral feature branch environments
This tests dynamic infrastructure lifecycle modeling in CI/CD. A strong answer covers branch-triggered provisioning, dynamic naming, automatic cleanup via stop jobs, and cost controls. Red flag: proposing manual teardown or static environments per branch.
How do you manage secrets within IaC configurations?
This tests secret injection and the security-complexity tradeoff in IaC. A strong answer contrasts a cloud secret manager with encrypted files or env vars, covering rotation and blast radius. A red flag is plaintext secrets in Git or state files.
Discuss security implications of developer-defined PaC pipelines
It tests balancing CI/CD flexibility with defense-in-depth against secret exfiltration. Cover scoped build identities, branch policies, approval gates, and sandboxed fork builds. Red flag: shared service connections or unrestricted pipeline admin rights.
Standardize and update CI/CD across hundreds of microservices without per-repo edits
Repos use a thin wrapper importing versioned shared-library templates; a control plane rolls out updates with canary validation. Decoupling pipeline logic from service repos via centralized templates.
Implement a manual approval gate for production deployment in pipeline-as-code
This tests embedding human governance in automated pipelines with auditability. A strong answer covers environment-scoped approvals, timeouts, RBAC, and immutable logs. Red flag: Ad-hoc manual deploys outside the pipeline or missing rollback plans.
How would you implement conditional logic in a pipeline?
Use if conditions with contexts like github.ref, separate trigger filters from runtime conditions, and add env rules. Declarative stage gating without shell hacks. Shell if statements in a job, not native conditionals.
How would you reuse pipeline steps across projects using PaC principles?
Tests DRY abstractions and coupling in CI/CD. Good answer: versioned reusable templates or libraries with parameterized inputs, consumed by composition. Red flag: raw copy-paste or one global pipeline forcing lockstep deployments.
How should you manage sensitive data in a committed pipeline file?
Tests that committed pipeline YAML must never store secrets. Answer: fetch at runtime via native secrets manager integrations; if needed, use masked, hidden, protected CI/CD variables; use typed CI/CD inputs for parameters.
What is Pipeline as Code and its benefits over GUI configuration?
Tests whether you treat delivery pipelines as versioned code. Strong answers define PaC as pipeline definitions in source control, citing branch automation, peer review, audit trails, and single source of truth.
Promote an artifact from staging to release without rebuilding it
Tests immutable artifact discipline. Answer: promote by copying the binary or retagging the image digest, never recompiling, because rebuilds introduce dependency drift and untested bits.
How do you version Docker images: Git SHA or SemVer?
Your grasp of immutable artifacts and traceability versus human-readable releases. Tag every build with Git SHA for immutability, then apply SemVer aliases only on promoted images. Treating floating tags like latest or v1 as safe production targets.
What is a CI/CD quality gate? Give a simple example.
Thresholds blocking merges; a minimal new-code gate with 0 critical issues & 70% new-code coverage. Go/no-go policy enforcement in CI/CD, not just test execution. Tests or linters as gates without thresholds.
How would you design a multi-arch build process and anticipate challenges?
Mention buildx or cross-compilation, split native and emulated builds, cache per-arch layers. Cross-platform CI/CD orchestration and build abstraction.
Compare ephemeral container agents versus persistent build agents
Ephemeral agents ensure clean state but add cold-start latency; persistent agents speed builds via caching yet risk config drift. Tradeoffs between isolation and speed.
Describe using a pre-push Git hook for checks and its CI limitations.
It tests client-side automation versus server-side policy. An executable .git/hooks/pre-push script runs tests and exits non-zero to block, noting hooks are not cloned, skipped via --no-verify, and local-only. A red flag is treating them as policy gate.
Difference between git merge and git rebase before a pull request
Rebase rewrites SHAs, duplicating CI builds; merge keeps identity and triggers one build. Grasp of linear vs branched history and CI traceability. Calling rebase safer while ignoring force-push and broken links.
How does your CI/CD strategy differ between monoliths and microservices?
Contrast monolith unified builds with microservice independent deploys, side-by-side versions, and service gates. Grasp of release coupling and blast radius. Shared pipeline for all services or no monolith rollback.
What is a build artifact and why build once deploy many crucial?
Tests whether you see artifacts as immutable deployable units. A strong answer says one binary is promoted through all stages, config is externalized, and rebuilding per environment creates drift. Red flag: accepting per-environment rebuilds.
Describe the typical CI pipeline sequence from push to deploy
This tests stage ordering and failure handling. A strong answer lists build, test, and deploy stages; notes intra-stage parallelism and inter-stage sequencing; and mentions early termination on failure.
What is CI, and what is its single most important goal?
Frequent merges to a shared branch with automated build and test; top goal is a workable integrated codebase. Distinguishing CI as keeping code workable, not just builds.
GitLab CI/CD: Pipeline as Code
Your .gitlab-ci.yml file turns your repo into an assembly line. Pushes trigger build and test jobs across runners. One missing rules clause can spawn jobs on every branch and explode compute costs.
Bitbucket beta adds live deployment status to PR lists
Bitbucket beta adds a Deployment column to PR lists showing live environment status per commit, cutting context switches to pipeline UIs during incidents. Existing Pipelines users get it automatically; others enable it by adding a deployment step to…
What technical and process challenges appear when forming cross-functional product teams?
Tests whether you see cross-functional integration as dissolving handoffs, not renaming teams. Strong answers mention testing in CI/CD, collective estimation, and social friction. Weak answers treat it as a staffing reshuffle that keeps siloed workflows.
Get Devops bites daily.
Five a day, five minutes, offline. With quizzes so it sticks.
Open testing — you’ll join as an early tester.