Skip to content
$ lynuxpro

INTERVIEW PREP

Interview questions

570 questions from real DevOps, SRE, platform engineering and MLOps interviews, with the answer an interviewer wants to hear. Try answering out loud first, then open the model answer.

Showing 271–285 of 475 questions

271.How does Argo CD read a private Git repo?MidGitOps with Argo CD

You add credentials once with argocd repo add, using an HTTPS token or an SSH deploy key. Use a read-only key for that repo only. Every Application that uses the repo then works.

272.How is Argo CD different from Flux?SeniorGitOps with Argo CD

Both pull from Git and reconcile the cluster. Argo CD has a web UI, an Application object that shows sync and health, and ApplicationSets. Flux is made of smaller controllers with no UI of its own and fits well when you want everything as plain Kubernetes objects. The GitOps ideas are the same.

273.How do you stop a risky automatic deploy on Friday afternoon?SeniorGitOps with Argo CD

Add a sync window to the AppProject that denies syncs at those times, or use manual sync for production. A person can still be allowed to sync in an emergency with manualSync.

274.What stops prune from deleting something important?SeniorGitOps with Argo CD

Test with argocd app diff and sync --dry-run first, put the annotation argocd.argoproj.io/sync-options: Prune=false on objects that must stay, use PruneLast, and protect the config repo branch so changes are reviewed.

275.What is infrastructure as code, and why use it?BeginnerTerraform

It means describing servers, networks and other cloud things in files instead of clicking in a console. The files live in Git, so changes are reviewed, repeatable and have history. You can build the same setup again for dev, prod or disaster recovery.

276.What do terraform init, plan and apply each do?BeginnerTerraform

init downloads providers and sets up the backend. plan compares your code with the state and shows what would change, without changing anything. apply makes those changes. Saving the plan with -out and applying that file makes sure you apply exactly what was reviewed.

277.What is a provider?BeginnerTerraform

A plugin that knows how to talk to one platform's API, such as AWS, Azure, GitLab or Kubernetes. You choose it and its version in required_providers, and init downloads it.

278.What is the difference between a variable, a local and an output?BeginnerTerraform

A variable is an input from outside. A local is a named value worked out inside the code. An output is a result shown to you or read by other code.

279.What is the state file, and why does it matter?BeginnerTerraform

State records which real resource each block in your code manages, plus its settings. Terraform compares it with your code and the real cloud to decide what to change. Losing it means Terraform no longer knows what it owns.

280.Why use a remote backend with locking?MidTerraform

A shared backend such as S3 gives the whole team one copy of state. Locking stops two people applying at the same time, which could corrupt state. Turn on versioning and encryption for the bucket as well, because state can contain secrets.

281.What is the difference between a resource and a data source?MidTerraform

A resource is something Terraform creates and manages. A data source only reads something that already exists, such as an existing VPC or the latest AMI, so you can use its values without managing it.

282.How does Terraform decide the order of work?MidTerraform

It builds a dependency graph from references. If one resource uses another's attribute, it waits for it. Independent resources run in parallel. Use depends_on only when there is a hidden dependency with no reference.

283.When should you use for_each instead of count?MidTerraform

Use for_each when each item has a clear name. Each copy gets a stable key, so removing one item destroys only that item. With count, copies are numbered, so removing one from the middle shifts the others and can cause changes or deletes you did not want.

284.What is a module?MidTerraform

A folder of Terraform files used as a reusable package, with variables as inputs and outputs as results. Call it with a module block and different values per environment. Pin the version when it comes from a registry or Git.

285.Workspaces or separate folders for environments?MidTerraform

Workspaces keep several states in one backend and are quick to start, but it is easy to run in the wrong one and the code is shared exactly. Separate folders give each environment its own backend, variables and access rules, which is safer for production. Many teams choose folders or separate pipelines.