Chef FAQs for DevOps Interviews: Quick Answers (2027)
51 Chef FAQs with short answers for DevOps interviews: Chef Infra, Policyfiles, Test Kitchen, InSpec, knife commands and Chef Infra Client 19.
Chef FAQs in DevOps interviews are short, factual questions: what Chef Infra, Chef Infra Server, Chef Workstation and Chef InSpec do, how resources, recipes, cookbooks and run-lists fit together, which knife and chef commands you use daily, and who maintains Chef today. This page gives 51 quick answers you can revise the night before an interview.
Think of it as a revision sheet. Each answer is two to four sentences, followed where useful by the exact command. If you want longer explanations, read the 45 most asked Chef Infra interview questions. For debugging failed runs, see 60+ Chef troubleshooting interview questions. Facts were checked against docs.chef.io (Chef Infra Client 19 and Chef Workstation 26.1) in November 2026.
Key takeaways
- Chef is owned by Progress, which acquired it in 2020. Chef Infra Client 19 (February 2026) is the current long-term support release.
- Version 19 is built on Chef Habitat packaging rather than Omnibus, with native installers for Windows (.msi) and Linux (.rpm and .deb) on x86_64.
- The core chain is resource, recipe, cookbook, run-list, node. Learn those five words well.
- Policyfiles are the recommended way to pin cookbook versions per group of nodes.
- Expect at least one question comparing Chef with Ansible or Puppet.
Chef products at a glance
| Product | What it does |
|---|---|
| Chef Infra Client | Agent on each node that applies cookbooks |
| Chef Infra Server | Central hub that stores cookbooks, policies, node data and search indexes |
| Chef Workstation | Developer toolkit: knife, chef CLI, Test Kitchen, Cookstyle, chef-shell |
| Chef InSpec | Compliance and test language for checking system state |
| Chef Habitat | Application packaging and the packaging base for Infra Client 19 |
| Chef Automate | Dashboard for runs, compliance reports and node visibility |
FAQs for freshers
1. What is Chef?
Chef is a configuration management tool. You describe the desired state of servers in Ruby-based code, and Chef Infra Client brings each node to that state.
2. Is Chef push or pull?
Pull by default. Each node's Chef Infra Client contacts the Chef Infra Server on a schedule and pulls its configuration.
3. What language is Chef written in?
Recipes use a Ruby DSL. You do not need deep Ruby skills to start, but you need basic Ruby for conditionals, loops and custom resources.
4. What is a resource?
The smallest unit of configuration, such as package, service, file, template or user. It has a type, a name, properties and actions.
package 'nginx' do
action :install
end
5. What is a recipe?
A Ruby file containing resources, run in order. Recipes live in a cookbook's recipes/ directory.
6. What is a cookbook?
A package of recipes, attributes, templates, files, custom resources, tests and a metadata.rb file that declares name, version and dependencies.
7. What is a node?
Any machine Chef manages: a VM, physical server, cloud instance, container or network device.
8. What is a run-list?
The ordered list of recipes and roles a node runs, for example recipe[nginx], role[web].
9. What is knife?
The command-line tool on the workstation for talking to Chef Infra Server: uploading cookbooks, bootstrapping nodes, editing roles and searching.
10. What is Ohai?
The system profiler that runs at the start of each run and stores facts like platform, IP and memory as automatic attributes.
11. What is Chef Supermarket?
The community site for sharing cookbooks. Organizations can also run a private Supermarket.
12. What does bootstrap mean?
Installing Chef Infra Client on a new node and registering it with the server, usually with knife bootstrap.
13. What is a template?
A resource that renders an ERB file with variables into a config file on the node.
14. What is a data bag?
A global JSON store on the Chef Infra Server for data such as users or settings. Items can be encrypted.
15. What are attributes?
Node-specific settings. They come from cookbooks, roles, environments, Policyfiles and Ohai, and have precedence levels.
16. What is idempotency in Chef?
Running a cookbook again on a converged node makes no changes. Built-in resources check state before acting.
FAQs for 2 to 5 years of experience
17. What are the attribute precedence levels?
default, force_default, normal, override, force_override and automatic, from lowest to highest. Automatic attributes come from Ohai and cannot be overridden.
18. Roles versus environments?
A role groups run-list items and attributes for a function such as web server. An environment represents a stage such as production and can pin cookbook versions.
19. What is a Policyfile?
A file that defines a node's run-list and exact cookbook versions. chef install produces Policyfile.lock.json, which is pushed to a policy group on the server.
chef install
chef push staging Policyfile.lock.json
chef diff --git HEAD
20. What is a policy group?
A set of nodes that share the same Policyfile revision, such as dev, staging or prod.
21. What are guards?
only_if and not_if properties that decide whether a resource runs.
22. What are notifications?
notifies and subscribes let one resource trigger an action on another, such as restarting a service after a template changes. Timers are :delayed, :immediately and :before.
23. What is a custom resource?
A reusable resource you define in a cookbook's resources/ directory with properties and actions. It replaced older LWRPs and definitions.
24. What is unified mode?
A setting that compiles and converges a custom resource's action block in one pass, in written order.
25. What is Test Kitchen?
A tool that creates test instances, converges your cookbook and runs tests. Main commands: kitchen converge, kitchen verify, kitchen test, kitchen destroy.
26. What is ChefSpec?
A unit testing framework for cookbooks that simulates a run in memory, so tests are fast and need no VM.
27. What is Cookstyle?
A linter for cookbooks based on RuboCop, with cops specific to Chef. Run cookstyle or cookstyle -a to auto-correct.
28. What is Berkshelf?
An older dependency manager for cookbooks. Policyfiles cover the same need for most new projects.
29. What is chef-client local mode?
chef-client -z runs against an in-memory chef-zero server using a local repository. It is used for testing and simple setups.
30. What is why-run mode?
chef-client -W reports what would change without changing it.
31. How do you handle secrets?
Encrypted data bags, chef-vault, or fetching from an external secrets manager at converge time. Mark sensitive resources with sensitive true so values stay out of logs.
32. What is a handler?
Ruby code that runs at the start, end, or on failure of a run, for example to send reports or alerts.
33. What is Chef InSpec used for?
Writing tests and compliance controls such as "port 23 is not listening". It runs locally, over SSH or WinRM, and in Test Kitchen.
34. How does Chef fit into CI/CD?
A pipeline runs Cookstyle, ChefSpec and Test Kitchen on each change, then pushes a Policyfile revision to the next policy group after tests pass.
FAQs for senior engineers
35. Who owns Chef now?
Progress Software, which acquired Chef in 2020.
36. What changed in Chef Infra Client 19?
It is the new long-term support release, built on Chef Habitat packaging, with a migration tool for moving from Omnibus installs and Target Mode improvements. Version 18 left active support in February 2026.
37. What is Target Mode?
Running Chef Infra Client against a remote target over a connection such as SSH, without installing the client on the target. Chef 19 added support for SSH-only nodes, sudo and multiple targets.
38. Chef versus Ansible?
Chef uses an agent and a server with a Ruby DSL. Ansible is agentless, uses SSH and YAML playbooks. Chef suits large fleets with strong testing habits. Ansible is quicker to adopt.
39. Chef versus Puppet?
Both are agent-based and pull-based. Puppet uses its own declarative language and builds a catalog first. Chef recipes run in order, which some teams find easier to reason about.
40. How do you scale Chef Infra Server?
Use the vendor's high-availability options, spread client run schedules with splay so nodes do not all check in at once, and keep searches light.
41. How do you promote changes safely?
Push Policyfile revisions through policy groups one at a time, watch run success in each, and keep the previous lock file ready to push back.
42. How do you structure cookbooks for many teams?
Shared base cookbooks owned by a platform team, small application cookbooks owned by app teams, and wrapper cookbooks to set attributes rather than forking.
43. What licence terms apply to Chef?
Progress distributes commercial Chef products under its licence terms and requires licence acceptance. Check the current terms on docs.chef.io before an install.
44. What is Chef Habitat?
A tool for packaging applications with their dependencies and running them under a supervisor. In version 19 it also became the packaging base for Chef Infra Client, replacing Omnibus builds.
45. What is Chef Automate used for?
A dashboard that collects Chef Infra Client run data and InSpec compliance reports, so you can see failed runs, node status and compliance across the fleet in one place.
46. What does splay do?
Splay adds a random delay before each scheduled run so thousands of nodes do not contact the Chef Infra Server at the same moment. It works with the interval setting.
Quick scenario FAQs
47. A run failed. First step?
Read /var/chef/cache/chef-stacktrace.out and rerun with chef-client -l debug.
48. A node uses an old cookbook. Why?
Its policy group has an old lock revision, or an environment pins the version.
49. A service restarts every run. Why?
A notifying resource is not idempotent, often a template with changing content or an execute without a guard.
50. A new node fails with 401. Why?
Wrong validator or client key, or clock drift of more than 15 minutes.
51. You need to test one recipe on production safely. How?
Run chef-client -W -o 'recipe[name]' to preview without saving the run-list or changing the system.
Daily commands
| Task | Command |
|---|---|
| Upload cookbook | knife cookbook upload NAME |
| Bootstrap node | knife bootstrap HOST -U USER --sudo |
| Search nodes | knife search node 'role:web' |
| Node status | knife status |
| Lock policy | chef install |
| Push policy | chef push GROUP |
| Test cookbook | kitchen test |
| Lint | cookstyle |
Related reading: infrastructure as code tools ranked, 80+ Ansible interview questions and the DevOps interview questions hub. Configuration management is part of our DevOps training in Pune, in Kharadi or live online.
FAQ
Is Chef still used?
Yes. Progress released Chef Infra Client 19 as a long-term support version in February 2026.
Who owns Chef?
Progress Software, since 2020.
Do I need Ruby for Chef?
Basic Ruby is enough to start. Custom resources and complex logic need more.
Policyfile or roles and environments?
Policyfiles for new work, because they lock exact cookbook versions per policy group.
What is the difference between Chef Infra and Chef InSpec?
Chef Infra changes systems to a desired state. Chef InSpec tests whether systems meet a desired state.
How is this page different from other Chef question lists?
It is a short-answer revision sheet. Longer explanations are in the 45 most asked questions guide, and debugging questions are in the troubleshooting guide.
References
What's Your Reaction?
Like
0
Dislike
0
Love
0
Funny
0
Angry
0
Sad
0
Wow
0